File.Exists Method |
System.IO.File
File.Exists( path )
The file path
A Boolean indicating whether the file exists
Indicates whether a file exists
path is a fully qualified filename or a relative path (which is interpreted as starting in the current directory).
The Exists method returns True only if the specified file exists; otherwise , it returns False . Note that Exists returns False if path describes a directory instead of a folder.
Since the File class is shared, you don't have to instantiate any objects before calling the File.Exists method.
Directory.Exists Method