Method | Description | |
---|---|---|
ChangeDeviceNameToDriveLetter ( string path ) : string |
Changes the DOS device name for the path given to the according drive letter. This method also supports UNC paths. |
|
ChangeDriveLetterToDeviceName ( string path ) : string |
Changes the drive letter for the path given to the according DOS device name. This method also supports UNC paths. |
|
ChangeParent ( string path, string oldParent, string newParent ) : string |
Changes the parent of a path string. This method is useful, when you need not just replace the path root, but one of its parent. |
|
CompactPath ( string longPathName, int newLength ) : string |
Truncates a path to fit within a certain number of characters by replacing path components with ellipses. The |
|
EndWithDirectorySeparator ( string path ) : string |
Makes sure that the path ends with the directory separator.
|
|
GenerateUniqueFileName ( string parentDirectory, string prefix, string extension ) : string |
Generates unique file name in the parentDirectory. The result file name will look like the following: |
|
GetFileNameWithoutExtension ( string path, string extension ) : string |
Returns the file name of the specified path string without the extension. If the path does not end with the extension, its original value is returned. |
Method | Description | |
---|---|---|
GetDeviceDosName ( string rootPath ) : string |
Queries OS for the device name.
|
|
UpdateDeviceMappings ( ) : void |
Updates the internal maps between the volume names (
|
public static ChangeDeviceNameToDriveLetter ( string path ) : string | ||
path | string | Path to replace DOS device name for. |
return | string |
public static ChangeDriveLetterToDeviceName ( string path ) : string | ||
path | string | Path to replace the drive letter for. |
return | string |
public static ChangeParent ( string path, string oldParent, string newParent ) : string | ||
path | string | The path information to modify. |
oldParent | string | The old parent. |
newParent | string | The new parent. |
return | string |
public static CompactPath ( string longPathName, int newLength ) : string | ||
longPathName | string | Path to be altered. |
newLength | int | The maximum number of characters to be contained in the new string. |
return | string |
public static EndWithDirectorySeparator ( string path ) : string | ||
path | string | The path information to modify. |
return | string |
public static GenerateUniqueFileName ( string parentDirectory, string prefix, string extension ) : string | ||
parentDirectory | string | Directory, where the file will be stored into. |
prefix | string | File prefix. May be |
extension | string | File extension. May be |
return | string |
public static GetFileNameWithoutExtension ( string path, string extension ) : string | ||
path | string | Path to the file. |
extension | string | Extension to be removed (with or without leading dot), if the |
return | string |