System.IO.Path Members

The members of System.IO.Path are listed below.

See Also: Inherited members from System.Object

Public Fields

static readonly
AltDirectorySeparatorCharchar.

Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.

static readonly
DirectorySeparatorCharchar.

Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.

static readonly
InvalidPathCharschar[].

Provides a platform-specific array of characters that cannot be specified in path string arguments passed to members of the System.IO.Path class.

static readonly
PathSeparatorchar.

A platform-specific separator character used to separate path strings in environment variables.

static readonly
VolumeSeparatorCharchar.

Provides a platform-specific volume separator character.

Public Methods

static
ChangeExtension(string, string) : string

Changes the extension of a path string.

static
Combine(params string[]) : string

Combines an array of strings into a path.

static
Combine(string, string) : string

Combines two strings into a path.

static
Combine(string, string, string) : string

Combines three strings into a path.

static
Combine(string, string, string, string) : string

Combines four strings into a path.

static
GetDirectoryName(string) : string

Returns the directory information for the specified path string.

static
GetExtension(string) : string

Returns the extension of the specified path string.

static
GetFileName(string) : string

Returns the file name and extension of the specified path string.

static
GetFileNameWithoutExtension(string) : string

Returns the file name of the specified path string without the extension.

static
GetFullPath(string) : string

Returns the absolute path for the specified path string.

static
GetInvalidFileNameChars() : char[]

Gets an array containing the characters that are not allowed in file names.

static
GetInvalidPathChars() : char[]

Gets an array containing the characters that are not allowed in path names.

static
GetPathRoot(string) : string

Gets the root directory information of the specified path.

static
GetRandomFileName() : string

Returns a random folder name or file name.

static
GetTempFileName() : string

Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file.

static
GetTempPath() : string

Returns the path of the current user's temporary folder.

static
HasExtension(string) : bool

Determines whether a path includes a file name extension.

static
IsPathRooted(string) : bool

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