NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Directory.DirectoryExists

Tests if the given path refers to an existing directory on disk.

[Visual Basic]
Public Shared Function DirectoryExists( _
   ByVal path As String _
) As Boolean
[C#]
public static bool DirectoryExists(
   string path
);
[C++]
public: static bool DirectoryExists(
   String* path
);
[JScript]
public static function DirectoryExists(
   path : String
) : Boolean;

Parameters

path
The path to test.

Return Value

true if path refers to an existing directory, false otherwise.

Exceptions

Exception Type Condition
ArgumentException path is the empty string ("") or contains only whitespaces.
ArgumentNullException path is null.
IOException path is invalid or an I/O error occurs (for example, a disk error).
SecurityException The caller does not have the required permission.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Read flag required for read permission to the target directory's contents.

See Also

Directory Class | Directory Members | System.IO Namespace