The Path class wraps the System.IO.Path class to avoid conflicts by having to use the CryEngine.FileSystem and System.IO at the same time. More...
Static Public Member Functions | |
static string | ChangeExtension (string path, string extension) |
Changes the extension of a path string. More... | |
static string | Combine (string path1, string path2) |
Combines two strings into a path. More... | |
static string | Combine (string path1, string path2, string path3) |
Combines three strings into a path. More... | |
static string | Combine (string path1, string path2, string path3, string path4) |
Combines three strings into a path. More... | |
static string | Combine (params string[] paths) |
Combines an array of strings into a path. More... | |
static string | GetDirectoryName (string path) |
Returns the directory information for the specified path string. More... | |
static string | GetExtension (string path) |
Returns the extension of the specified path string. More... | |
static string | GetFileName (string path) |
Returns the file name and extension of the specified path string. More... | |
static string | GetFileNameWithoutExtension (string path) |
Returns the file name of the specified path string without the extension. More... | |
static string | GetFullPath (string path) |
Returns the absolute path for the specified path string. More... | |
static char [] | GetInvalidFileNameChars () |
Gets an array containing the characters that are not allowed in file names. More... | |
static char [] | GetInvalidPathChars () |
Gets an array containing the characters that are not allowed in path names. More... | |
static string | GetPathRoot (string path) |
Gets the root directory information of the specified path. More... | |
static string | GetRandomFileName () |
Returns a random folder name or file name. More... | |
static string | GetTempFileName () |
Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file. More... | |
static string | GetTempPath () |
Returns the path of the current user's temporary folder. More... | |
static bool | HasExtension (string path) |
Determines whether a path includes a file name extension. More... | |
static bool | IsPathRooted (string path) |
Gets a value indicating whether the specified path string contains a root. More... | |
Static Public Attributes | |
static char | AltDirectorySeparatorChar => SystemPath.AltDirectorySeparatorChar |
Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization. More... | |
static char | DirectorySeparatorChar => SystemPath.DirectorySeparatorChar |
Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization. More... | |
static char | PathSeparator => SystemPath.PathSeparator |
A platform-specific separator character used to separate path strings in environment variables. More... | |
static char | VolumeSeparatorChar => SystemPath.VolumeSeparatorChar |
Provides a platform-specific volume separator character. More... | |
The Path class wraps the System.IO.Path class to avoid conflicts by having to use the CryEngine.FileSystem and System.IO at the same time.
|
inline static |
Changes the extension of a path string.
path | The path information to modify. The path cannot contain any of the characters defined in GetInvalidPathChars. |
extension | The new extension (with or without a leading period). Specify null to remove an existing extension from path . |
|
inline static |
Combines two strings into a path.
path1 | The first path to combine. |
path2 | The second path to combine. |
|
inline static |
Combines three strings into a path.
path1 | The first path to combine. |
path2 | The second path to combine. |
path3 | The third path to combine. |
|
inline static |
Combines three strings into a path.
path1 | The first path to combine. |
path2 | The second path to combine. |
path3 | The third path to combine. |
path4 | The fourth path to combine. |
|
inline static |
Combines an array of strings into a path.
paths | An array of parts of the path. |
|
inline static |
Returns the directory information for the specified path string.
path | Directory information for path , or null if path denotes a root directory or is null. Returns String.Empty if path does not contain directory information. |
|
inline static |
Returns the extension of the specified path string.
null
, or String.Empty. If path is null
, GetExtension returns null
. If path does not have extension information, GetExtension returns String.Empty. path | The path string from which to get the extension. |
|
inline static |
Returns the file name and extension of the specified path string.
null
, this method returns null
. path | The path string from which to obtain the file name and extension. |
|
inline static |
Returns the file name of the specified path string without the extension.
path | The path of the file. |
|
inline static |
Returns the absolute path for the specified path string.
path | The file or directory for which to obtain absolute path information. |
|
inline static |
Gets an array containing the characters that are not allowed in file names.
|
inline static |
Gets an array containing the characters that are not allowed in path names.
|
inline static |
Gets the root directory information of the specified path.
null
if path is null
, or an empty string if path does not contain root directory information.path | The path from which to obtain root directory information. |
|
inline static |
Returns a random folder name or file name.
|
inline static |
Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file.
|
inline static |
Returns the path of the current user's temporary folder.
|
inline static |
Determines whether a path includes a file name extension.
true
if the characters that follow the last directory separator (\ or /) or volume separator (:) in the path include a period (.) followed by one or more characters; otherwise, false
. path | The path to search for an extension. |
|
inline static |
Gets a value indicating whether the specified path string contains a root.
true
if path contains a root; otherwise, false
.path | The path to test. |
|
static |
Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.
The alternate directory separator char.
|
static |
Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.
The directory separator char.
|
static |
A platform-specific separator character used to separate path strings in environment variables.
The path separator.
|
static |
Provides a platform-specific volume separator character.
The volume separator char.