CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
|
Provides methods for manipulating paths. This is a static type with no instance services. You should never create instances of it by any means. More...
#include <path.h>
Static Public Member Functions | |
static String | ChangeExtension (const String &path, const String &extension) |
Changes the extension in the specified file path. More... | |
static String | Combine (const ArrayPtr< String > &paths) |
Combines the specified path segments into a single path inserting directory separator characters between the segments if necessary. More... | |
static String | Combine (const String &path1, const String &path2) |
Combines two specified path segments into a single path inserting directory separator character between the segments if necessary. More... | |
static String | Combine (const String &path1, const String &path2, const String &path3) |
Combines three specified path segments into a single path inserting directory separator characters between the segments if necessary. More... | |
static String | Combine (const String &path1, const String &path2, const String &path3, const String &path4) |
Combines four specified path segments into a single path inserting directory separator characters between the segments if necessary. More... | |
static String | GetDirectoryName (const String &path) |
Returns the name of the directory referenced by the specified path. More... | |
static String | GetExtension (const String &path) |
Returns the extension of the file referenced by the specified path. More... | |
static String | GetFileName (const String &path) |
Returns the name of the file referenced by the specified path. More... | |
static String | GetFileNameWithoutExtension (const String &path) |
Returns the name without extension of the file referenced by the specified path. More... | |
static String | GetFullPath (const String &path) |
Converts the specified path into absolute path. More... | |
static ArrayPtr< char_t > | GetInvalidFileNameChars () |
Returns an array containing characters that are not allowed in the names of files. More... | |
static ArrayPtr< char_t > | GetInvalidPathChars () |
Returns an array containing characters that are not allowed in path names. More... | |
static String | GetPathRoot (const String &path) |
Returns the root directory of the specified path. More... | |
static String | GetRandomFileName () |
Returns a randomly generated file name. More... | |
static String | GetTempFileName_ () |
Creates a new file with a unique name and returns a full path to it. More... | |
static String | GetTempFileNameSafe () |
Creates a new file with a unique name and returns a full path to it. Is a synonym of GetTempFileName_() method. More... | |
static String | GetTempPath () |
Returns the path of the current user's temporary directory. More... | |
static bool | HasExtension (const String &path) |
Determines if the specified path references a file with extension. More... | |
static bool | IsPathRooted (const String &path) |
Determines if the specified path contains a root. More... | |
static void | CheckPath (const String &path, const String &msg=s_msg_path, bool allow_empty=true) |
Determines if the specified path is valid by checking if it contains invalid characters. An exception is thrown if the path contains invalid characters. More... | |
static String | ToString (const boost::filesystem::path &path) |
Returns a string representation of the specified Boost's path object. More... | |
static boost::filesystem::path | ToBoost (const String &path) |
Returns an instance of boost::filesystem::path class that represents the specified path. More... | |
static String | NormalizePath (const String &path) |
Normalizes the specified path. More... | |
Static Public Attributes | |
static const char_t | AltDirectorySeparatorChar |
An alternate character used to separate directory levels in a path. More... | |
static const char_t | DirectorySeparatorChar |
A character used to separate directory levels in a path. More... | |
static const char_t | PathSeparator |
A separator character used to separate path strings in environment variables. More... | |
static const char_t | VolumeSeparatorChar |
A volume separator character. More... | |
static const String | s_msg_path |
Default parameter name for CheckPath function. More... | |
Provides methods for manipulating paths. This is a static type with no instance services. You should never create instances of it by any means.
|
static |
Changes the extension in the specified file path.
path | A file path |
extension | The extension to replace the one in path with |
path
with extension replaced with extension
|
static |
Determines if the specified path is valid by checking if it contains invalid characters. An exception is thrown if the path contains invalid characters.
path | The path to check |
msg | The message to pass to the exception object's constructor |
allow_empty | Specifies whether an empty or null string should be considered a correct path (true) or not (false); if this parameter is false and path is empty an ArgumentException is thrown; if this parameter is false and path is null an ArgumentNullException is thrown |
Combines the specified path segments into a single path inserting directory separator characters between the segments if necessary.
paths | An array containing path segments to combine |
Combines two specified path segments into a single path inserting directory separator character between the segments if necessary.
path1 | The first path segment |
path2 | The second path segment |
|
static |
Combines three specified path segments into a single path inserting directory separator characters between the segments if necessary.
path1 | The first path segment |
path2 | The second path segment |
path3 | The third path segment |
|
static |
Combines four specified path segments into a single path inserting directory separator characters between the segments if necessary.
path1 | The first path segment |
path2 | The second path segment |
path3 | The third path segment |
path4 | The fourth path segment |
Returns the name of the directory referenced by the specified path.
path | A path to a directory |
Returns the extension of the file referenced by the specified path.
path | A path to a file |
Returns the name of the file referenced by the specified path.
path | A path to a file |
Returns the name without extension of the file referenced by the specified path.
path | A path to a file |
Converts the specified path into absolute path.
path | The path to convert |
path
|
static |
Returns an array containing characters that are not allowed in the names of files.
|
static |
Returns an array containing characters that are not allowed in path names.
Returns the root directory of the specified path.
path | The path from which to obtain the root |
path
|
static |
Returns a randomly generated file name.
|
static |
Creates a new file with a unique name and returns a full path to it.
|
static |
Creates a new file with a unique name and returns a full path to it. Is a synonym of GetTempFileName_() method.
|
static |
Returns the path of the current user's temporary directory.
|
static |
Determines if the specified path references a file with extension.
path | A path to check |
path
references a file with extension, otherwise - false
|
static |
Determines if the specified path contains a root.
path | A path to check |
path
contains a root, otherwise - false Normalizes the specified path.
path | A path to normalize |
|
static |
Returns an instance of boost::filesystem::path class that represents the specified path.
path | A path |
path
|
static |
Returns a string representation of the specified Boost's path object.
path | The boost::filesystem::path object to convert to string |
path
|
static |
An alternate character used to separate directory levels in a path.
|
static |
A character used to separate directory levels in a path.
|
static |
A separator character used to separate path strings in environment variables.
|
static |
Default parameter name for CheckPath function.
|
static |
A volume separator character.