Path Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Performs operations on String instances that contain file or directory path information. These operations are performed in a cross-platform manner.
Inheritance Hierarchy
System. . :: . .Object
System.IO..::..Path
Namespace: System.IO
Assembly: System.IO (in System.IO.dll)
Syntax
'Declaration
Public NotInheritable Class Path
public sealed class Path
public ref class Path sealed
[<Sealed>]
type Path = class end
public final class Path
The Path type exposes the following members.
Methods
Name | Description | |
---|---|---|
ChangeExtension | Changes the extension of a path string. | |
Combine | Combines two strings into a path. | |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
GetDirectoryName | Returns the directory information for the specified path string. | |
GetExtension | Returns the extension of the specified path string. | |
GetFileName | Returns the file name and extension of the specified path string. | |
GetFileNameWithoutExtension | Returns the file name of the specified path string without the extension. | |
GetFullPath | Returns the absolute path for the specified path string. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetInvalidPathChars | Gets an array containing the characters that are not allowed in path names. | |
GetPathRoot | Gets the root directory information of the specified path. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasExtension | Determines whether a path includes a file name extension. | |
IsPathRooted | Gets a value indicating whether the specified path string contains a root. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Fields
Name | Description | |
---|---|---|
DirectorySeparatorChar | Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
InvalidPathChars | Provides a platform-specific array of characters that cannot be specified in path string arguments passed to members of the Path class. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.