Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenFileDialog: Difference between FileNames and SafeFileNames

For OpenFileDialog,
What are the differences between SafeFileNames and FileNames?

and Why is SafeFileNames is safe?

like image 770
dance2die Avatar asked Jul 16 '12 17:07

dance2die


1 Answers

The answer is right there on the pages you linked. The "safe" filename doesn't include the path. Just the filename and the extension. The regular filename includes the full path.

The SafeFileName is safe because it doesn't expose the directory structure of your computer.

like image 195
Matt Burland Avatar answered Oct 05 '22 21:10

Matt Burland