Path Class |
Namespace: Alphaleonis.Win32.Filesystem
The Path type exposes the following members.
Name | Description | |
---|---|---|
AddTrailingDirectorySeparator(String) | [AlphaFS] Adds a trailing DirectorySeparatorChar character to the string, when absent. | |
AddTrailingDirectorySeparator(String, Boolean) | [AlphaFS] Adds a trailing DirectorySeparatorChar or AltDirectorySeparatorChar character to the string, when absent. | |
ChangeExtension | Changes the extension of a path string. | |
Combine | Combines an array of strings into a path. | |
GetDirectoryName(String) | Returns the directory information for the specified path string. | |
GetDirectoryName(String, Boolean) | [AlphaFS] Returns the directory information for the specified path string. | |
GetDirectoryNameWithoutRoot | [AlphaFS] Returns the directory information for the specified path string without the root information, for example: "C:\Windows\system32" returns: "Windows". | |
GetDirectoryNameWithoutRootTransacted | [AlphaFS] Returns the directory information for the specified path string without the root information, for example: "C:\Windows\system32" returns: "Windows". | |
GetExtension(String) | Returns the extension of the specified path string. | |
GetExtension(String, Boolean) | Returns the extension of the specified path string. | |
GetFileName(String) | Returns the file name and extension of the specified path string. | |
GetFileName(String, Boolean) | [AlphaFS] Returns the file name and extension of the specified path string. | |
GetFileNameWithoutExtension(String) | Returns the file name of the specified path string without the extension. | |
GetFileNameWithoutExtension(String, Boolean) | [AlphaFS] Returns the file name of the specified path string without the extension. | |
GetFinalPathNameByHandle(SafeFileHandle) | [AlphaFS] Retrieves the final path for the specified file, formatted as FinalPathFormats. | |
GetFinalPathNameByHandle(SafeFileHandle, FinalPathFormats) | [AlphaFS] Retrieves the final path for the specified file, formatted as FinalPathFormats. | |
GetFullPath(String) | Returns the absolute path for the specified path string. | |
GetFullPath(String, GetFullPathOptions) | Returns the absolute path for the specified path string. | |
GetFullPathTransacted(KernelTransaction, String) | [AlphaFS] Returns the absolute path for the specified path string. | |
GetFullPathTransacted(KernelTransaction, String, GetFullPathOptions) | [AlphaFS] Returns the absolute path for the specified path string. | |
GetInvalidFileNameChars | Gets an array containing the characters that are not allowed in file names. | |
GetInvalidPathChars | Gets an array containing the characters that are not allowed in path names. | |
GetLongFrom83ShortPath | [AlphaFS] Converts the specified existing path to its regular long form. | |
GetLongFrom83ShortPathTransacted | [AlphaFS] Converts the specified existing path to its regular long form. | |
GetLongPath | Makes an extended long path from the specified path by prefixing LongPathPrefix. | |
GetMappedConnectionName | [AlphaFS] Gets the connection name of the locally mapped drive. | |
GetMappedUncName | [AlphaFS] Gets the network share name from the locally mapped path. | |
GetPathRoot(String) | Gets the root directory information of the specified path. | |
GetPathRoot(String, Boolean) | [AlphaFS] Gets the root directory information of the specified path. | |
GetRandomFileName | Returns a random folder name or file name. | |
GetRegularPath | [AlphaFS] Gets the regular path from long prefixed one. i.e.: "\\?\C:\Temp\file.txt" to C:\Temp\file.txt" or: "\\?\UNC\Server\share\file.txt" to "\\Server\share\file.txt". | |
GetRelativePath | [AlphaFS] Gets the relative path from the startPath path to the end path. | |
GetShort83Path | [AlphaFS] Retrieves the short path form of the specified path. | |
GetShort83PathTransacted | [AlphaFS] Retrieves the short path form of the specified path. | |
GetSuffixedDirectoryName | [AlphaFS] Returns the directory information for the specified path with a trailing DirectorySeparatorChar character. | |
GetSuffixedDirectoryNameTransacted | [AlphaFS] Returns the directory information for the specified path with a trailing DirectorySeparatorChar character. | |
GetSuffixedDirectoryNameWithoutRoot | [AlphaFS] Returns the directory information for the specified path without the root and with a trailing DirectorySeparatorChar character. | |
GetSuffixedDirectoryNameWithoutRootTransacted | [AlphaFS] Returns the directory information for the specified path without the root and with a trailing DirectorySeparatorChar character. | |
GetTempFileName | Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file. | |
GetTempPath | Returns the path of the current user's temporary folder. | |
GetTempPath(String) | [AlphaFS] Returns the path of the current user's temporary folder. | |
HasExtension | Determines whether a path includes a file name extension. | |
IsLogicalDrive | [AlphaFS] Checks if path is in a logical drive format, such as "C:", "D:". | |
IsLongPath | [AlphaFS] Determines whether the specified path starts with a LongPathPrefix or LongPathUncPrefix. | |
IsPathRooted(String) | Gets a value indicating whether the specified path string contains absolute or relative path information. | |
IsPathRooted(String, Boolean) | [AlphaFS] Gets a value indicating whether the specified path string contains absolute or relative path information. | |
IsUncPath | [AlphaFS] Determines if a path string is a valid Universal Naming Convention (UNC) path. | |
IsValidName | [AlphaFS] Check if file or folder name has any invalid characters. | |
LocalToUnc(String) | [AlphaFS] Converts a local path to a network share path.
A Local path, e.g.: "C:\Windows" or "C:\Windows\" will be returned as: "\\localhost\C$\Windows". If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing DirectorySeparator character. | |
LocalToUnc(String, GetFullPathOptions) | [AlphaFS] Converts a local path to a network share path, optionally returning it as a long path format and the ability to add or remove a trailing backslash.
A Local path, e.g.: "C:\Windows" or "C:\Windows\" will be returned as: "\\localhost\C$\Windows". If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing DirectorySeparator character. | |
LocalToUnc(String, PathFormat) | [AlphaFS] Converts a local path to a network share path.
A Local path, e.g.: "C:\Windows" or "C:\Windows\" will be returned as: "\\localhost\C$\Windows". If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing DirectorySeparator character. | |
LocalToUnc(String, PathFormat, GetFullPathOptions) | [AlphaFS] Converts a local path to a network share path, optionally returning it as a long path format and the ability to add or remove a trailing backslash.
A Local path, e.g.: "C:\Windows" or "C:\Windows\" will be returned as: "\\localhost\C$\Windows". If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing DirectorySeparator character. | |
RemoveTrailingDirectorySeparator(String) | [AlphaFS] Removes the trailing DirectorySeparatorChar character from the string, when present. | |
RemoveTrailingDirectorySeparator(String, Boolean) | [AlphaFS] Removes the trailing DirectorySeparatorChar or AltDirectorySeparatorChar character from the string, when present. | |
ResolveRelativePath | [AlphaFS] Gets the absolute path from the relative or absolute startPath and the relative selectedPath. |
Name | Description | |
---|---|---|
AltDirectorySeparator | [AlphaFS] AltDirectorySeparatorChar = "/" Provides a platform-specific alternate string used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
AltDirectorySeparatorChar | AltDirectorySeparatorChar = '/' Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
CurrentDirectoryPrefix | [AlphaFS] CurrentDirectoryPrefix = "." Provides a current directory string. | |
CurrentDirectoryPrefixChar | [AlphaFS] CurrentDirectoryPrefix = '.' Provides a current directory character. | |
DevicePrefix | [AlphaFS] DevicePrefix = "\Device\" Provides standard Windows Device prefix. | |
DirectorySeparator | [AlphaFS] DirectorySeparator = "\" Provides a platform-specific string used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
DirectorySeparatorChar | DirectorySeparatorChar = '\' Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
DosDeviceLanmanPrefix | Obsolete. [AlphaFS] DosDeviceLanmanPrefix = "\Device\LanmanRedirector\" Provides a MS-Dos Lanman Redirector Path UNC prefix to a network share. | |
DosDeviceMupPrefix | Obsolete. [AlphaFS] DosDeviceMupPrefix = "\Device\Mup\" Provides a MS-Dos Mup Redirector Path UNC prefix to a network share. | |
DosDeviceUncPrefix | [AlphaFS] DosDeviceUncPrefix = "\??\UNC\" Provides a SUBST.EXE Path UNC prefix to a network share. | |
ExtensionSeparatorChar | [AlphaFS] ExtensionSeparatorChar = '.' Provides an Extension Separator character. | |
GlobalRootPrefix | [AlphaFS] GlobalRootPrefix = "\\?\GlobalRoot\" Provides standard Windows Volume prefix. | |
LogicalDrivePrefix | [AlphaFS] Win32 Device Namespace. The "\\.\"prefix is how to access physical disks and volumes, without going through the file system, if the API supports this type of access. | |
LongPathPrefix | [AlphaFS] Win32 File Namespace. The "\\?\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system. | |
LongPathUncPrefix | [AlphaFS] LongPathUncPrefix = "\\?\UNC\" Provides standard Windows Long Path UNC prefix. | |
NetworkDriveSeparator | [AlphaFS] NetworkDriveSeparator = "$" Provides a platform-specific network drive separator string. | |
NetworkDriveSeparatorChar | [AlphaFS] NetworkDriveSeparator = '$' Provides a platform-specific network drive separator character. | |
NonInterpretedPathPrefix | [AlphaFS] NonInterpretedPathPrefix = "\??\" Provides a non-interpreted path prefix. | |
ParentDirectoryPrefix | [AlphaFS] ParentDirectoryPrefix = ".." Provides a parent directory string. | |
PathSeparator | PathSeparator = ';' A platform-specific separator character used to separate path strings in environment variables. | |
PhysicalDrivePrefix | [AlphaFS] PhysicalDrivePrefix = "\\.\PhysicalDrive" Provides standard physical drive prefix. | |
StreamDataLabel | [AlphaFS] StreamDataLabel = ':$DATA' Provides a platform-specific Stream :$DATA label. | |
StreamSeparator | [AlphaFS] StreamSeparator = ':' Provides a platform-specific Stream-name string. | |
StreamSeparatorChar | [AlphaFS] StreamSeparator = ':' Provides a platform-specific Stream-name character. | |
StringTerminatorChar | [AlphaFS] StringTerminatorChar = '\0' String Terminator Suffix. | |
UncPrefix | [AlphaFS] UncPrefix = "\\" Provides standard Windows Path UNC prefix. | |
WildcardQuestion | [AlphaFS] WildcardQuestion = "?" Provides a replace-item string. | |
WildcardQuestionChar | [AlphaFS] WildcardQuestion = '?' Provides a replace-item string. | |
WildcardStarMatchAll | [AlphaFS] WildcardStarMatchAll = "*" Provides a match-all-items string. | |
WildcardStarMatchAllChar | [AlphaFS] WildcardStarMatchAll = '*' Provides a match-all-items character. | |
VolumePrefix | [AlphaFS] VolumePrefix = "\\?\Volume" Provides standard Windows Volume prefix. | |
VolumeSeparator | [AlphaFS] VolumeSeparator = ":" Provides a platform-specific Volume Separator string. | |
VolumeSeparatorChar | VolumeSeparatorChar = ':' Provides a platform-specific Volume Separator character. |