DirectoryInfo.Exists Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets a value indicating whether the directory exists.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

Syntax

Public Overrides ReadOnly Property Exists As Boolean
public override bool Exists { get; }

Property Value

Type: System..::.Boolean
true if the directory exists; otherwise, false.

Remarks

The Exists property returns false if any error occurs while trying to determine if the specified file exists. This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters, a failing or missing disk, or if the caller does not have permission to read the file.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

DirectoryInfo Class

System.IO Namespace