Mono Class Library: System.IO.File Overview | MembersSystem.IO.File.Exists Method |
Returns a bool indicating whether the specified file exists. [Edit]
|
true if the caller has the required permissions and path contains the name of an existing file; otherwise, false. If path is null or a zero-length string, returns false. [Edit]
Type Reason System.Security.Permissions.FileIOPermission [Edit] Requires permission to read the specified file. See System.Security.Permissions.FileIOPermissionAccess.Read.
If the caller does not have sufficient permissions to read the specified file, no exception is thrown and the method returns false regardless of the existence of path.
The path argument is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory.
Note: To obtain the current working directory, see Directory.GetCurrentDirectory.[Edit]
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0