DirectoryGetParent Method (String, PathFormat) |
[AlphaFS] Retrieves the parent directory of the specified path, including both absolute and relative paths.
Namespace: Alphaleonis.Win32.FilesystemAssembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static DirectoryInfo GetParent(
string path,
PathFormat pathFormat
)
Public Shared Function GetParent (
path As String,
pathFormat As PathFormat
) As DirectoryInfo
public:
static DirectoryInfo^ GetParent(
String^ path,
PathFormat pathFormat
)
static member GetParent :
path : string *
pathFormat : PathFormat -> DirectoryInfo
Parameters
- path
- Type: SystemString
The path for which to retrieve the parent directory. - pathFormat
- Type: Alphaleonis.Win32.FilesystemPathFormat
Indicates the format of the path parameter(s).
Return Value
Type:
DirectoryInfoThe parent directory, or
if
path is the root directory, including the root of a UNC server or share name.
See Also