← Interactive API Explorer
Namespace: System.IO

Path

Performs operations on String instances that contain file or directory path information. These operations are performed in a cross-platform manner.

Methods (5)

String GetExtension(String)
Returns the extension of the specified path string.
ParameterDescription
pathThe path string from which to get the extension.
Returns: The extension of the specified path (including the period "."), or null, or Empty. If path is null, String) returns null. If path does not have extension information, String) returns Empty.
bool IsPathRooted(String)
Gets a value indicating whether the specified path string contains a root.
ParameterDescription
pathThe path to test.
Returns: true if path contains a root; otherwise, false.
String Combine(String[])
Combines an array of strings into a path.
ParameterDescription
pathsAn array of parts of the path.
Returns: The combined paths.
String GetFullPath(String)
Returns the absolute path for the specified path string.
ParameterDescription
pathThe file or directory for which to obtain absolute path information.
Returns: The fully qualified location of path, such as "C:\MyFile.txt".
String GetTempPath
Returns the path of the current user's temporary folder.
Returns: The path to the temporary folder, ending with a backslash.

Fields & Constants (3)

char DirectorySeparatorChar
Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.
char AltDirectorySeparatorChar
Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.
char VolumeSeparatorChar
Provides a platform-specific volume separator character.