ChangeExtension Changes the extension of a path string.
(C:\mydir\myfile.com.extension, .old)=> C:\mydir\myfile.com.old
(C:\mydir\myfile.com.extension, )=> C:\mydir\myfile.com.
(C:\mydir\, .old)=> C:\mydir\.old
Combine(String[]) Combines an array of strings into a path.
new[]{@"d:\archives", "2001", "media"} => d:\archives\2001\media
new[]{@"d:\archives", "2001", "\media"} => media (details)



GetDirectoryName Returns the directory information for the specified path string.
C:\MyDir\MySubDir\myfile.ext => C:\MyDir\MySubDir
C:\ =>


GetExtension Returns the extension of the specified path string.
C:\mydir.old\myfile.ext => .ext
C:\mydir.old\ =>



GetFileName Returns the file name and extension of the specified path string.
C:\mydir\myfile.ext => myfile.ext
C:\nydir =>



GetFileNameWithoutExtension Returns the file name of the specified path string without the extension.
C:\mydir\myfile.ext => myfile
C:\mydir\ =>



GetFullPath Returns the absolute path for the specified path string.
mydir => c:\temp\Demo\mydir [currentdir\mydir]
\mydir => c:\mydir

GetInvalidFileNameChars Gets an array containing the characters that are not allowed in file names.
Windows 7:
(", 0022) (<, 003C) (>, 003E) (|, 007C) (□, 0000) (□, 0001) (□, 0002) (□, 0003) (□, 0004) (□, 0005) (□, 0006) (□, 0007) (□, 0008) 0009 000A 000B 000C 000D (□, 000E) (□, 000F) (□, 0010) (□, 0011) (□, 0012) (□, 0013) (□, 0014) (□, 0015) (□, 0016) (□, 0017) (□, 0018) (□, 0019) (□, 001A) (□, 001B) (□, 001C) (□, 001D) (□, 001E) (□, 001F) (:, 003A) (*, 002A) (?, 003F) (\, 005C) (/, 002F)
GetInvalidPathChars Gets an array containing the characters that are not allowed in path names.
Windows 7:
Windows 7:
(", 0022) (<, 003C) (>, 003E) (|, 007C) (□, 0000) (□, 0001) (□, 0002) (□, 0003) (□, 0004) (□, 0005) (□, 0006) (□, 0007) (□, 0008) 0009 000A 000B 000C 000D (□, 000E) (□, 000F) (□, 0010) (□, 0011) (□, 0012) (□, 0013) (□, 0014) (□, 0015) (□, 0016) (□, 0017) (□, 0018) (□, 0019) (□, 001A) (□, 001B) (□, 001C) (□, 001D) (□, 001E) (□, 001F)



GetPathRoot Gets the root directory information of the specified path.
\mydir\ => \
myfile.ext =>
c:\mydir\myfile.ext => c:\


GetRandomFileName Returns a random folder name or file name
w143kxnu.idj


GetTempFileName Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file.
This method creates a temporary file with a .TMP file extension. The temporary file is created within the user’s temporary folder, which is the path returned by the GetTempPath method.

GetTempPath Returns the path of the current user’s temporary folder.
This method checks for the existence of environment variables in the following order and uses the first path found:
- The path specified by the TMP environment variable.
- The path specified by the TEMP environment variable.
- The path specified by the USERPROFILE environment variable.
- The Windows directory.

HasExtension Determines whether a path includes a file name extension.
myfile.ext => True
mydir\myfile => False
C:\myDir.ext\ => False



IsPathRooted Gets a value indicating whether the specified path string contains a root.