File.Exists Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Determines whether the specified file exists.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- path
- Type: System.String
The file to check.
Return Value
Type: System.Booleantrue if the caller has the required permissions and path contains the name of an existing file; otherwise, false. This method also returns false if path is Nothing, an invalid path, or a zero-length string. 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.
Version Notes
Windows Phone
This member has a SecurityCriticalAttribute attribute. This attribute restricts this member to internal use. Application code that uses this member throws a MethodAccessException.
Show: