Determines whether the specified path refers to a root.
[Visual Basic] Public Shared Function IsDirectoryRooted( _ ByVal path As String _ ) As Boolean [C#] public static bool IsDirectoryRooted( string path ); [C++] public: static bool IsDirectoryRooted( String* path ); [JScript] public static function IsDirectoryRooted( path : String ) : Boolean;
true if the path is a root path; otherwise, false.
Exception Type | Condition |
---|---|
ArgumentException | path is empty or contains only whitespaces. |
ArgumentNullException | path is null. |
SecurityException | The caller does not have the required permission. |
A path is considered rooted if it starts with a backslash ("\"), slash ("/") or a drive letter and a colon ("C:").
NGWS Runtime Security:
FileIOPermissionAccess | Read permission to the path. |
Directory Class | Directory Members | System.IO Namespace | DirectorySeparatorChar | AltDirectorySeparatorChar | VolumeSeparatorChar