PathGetDirectoryName Method (String, Boolean) |
[AlphaFS] Returns the directory information for the specified path string.
Namespace: Alphaleonis.Win32.FilesystemAssembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static string GetDirectoryName(
string path,
bool checkInvalidPathChars
)
Public Shared Function GetDirectoryName (
path As String,
checkInvalidPathChars As Boolean
) As String
public:
static String^ GetDirectoryName(
String^ path,
bool checkInvalidPathChars
)
static member GetDirectoryName :
path : string *
checkInvalidPathChars : bool -> string
Parameters
- path
- Type: SystemString
The path of a file or directory. - checkInvalidPathChars
- Type: SystemBoolean
will check path for invalid path characters.
Return Value
Type:
String
Directory information for
path, or
if
path denotes a root directory or is
. Returns
Empty if
path does not contain directory information.
Exceptions Exception | Condition |
---|
ArgumentException | The path parameter contains invalid characters, is empty, or contains only white spaces. |
See Also