![]() |
xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <path.h>
Performs operations on std::basic_string instances that contain file or directory path information. These operations are performed in a cross-platform manner.
Inherits xtd::static_object.
Static Public Member Functions | |
template<typename char_t > | |
static char_t | alt_directory_separator_char () noexcept |
Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
static char | alt_directory_separator_char () noexcept |
Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
static xtd::ustring | change_extension (const xtd::ustring &path, const xtd::ustring &extension) |
Changes the extension of a path string. | |
static xtd::ustring | combine (const std::initializer_list< xtd::ustring > &paths) noexcept |
Combines path strings array. | |
static xtd::ustring | combine (const xtd::ustring &path1, const xtd::ustring &path2) |
Combines two path strings. | |
template<typename path_t > | |
static xtd::ustring | combine (path_t paths) noexcept |
Combines path strings array. | |
template<typename type1_t , typename type2_t , typename type3_t > | |
static auto | combine (type1_t path1, type2_t path2, type3_t path3) noexcept |
Combines three path strings. | |
template<typename type1_t , typename type2_t , typename type3_t , typename type4_t > | |
static auto | combine (type1_t path1, type2_t path2, type3_t path3, type4_t path4) noexcept |
Combines four path strings. | |
template<typename char_t > | |
static char_t | directory_separator_char () noexcept |
Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
static char | directory_separator_char () noexcept |
Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization. | |
static xtd::ustring | get_directory_name (const xtd::ustring &path) |
Returns the directory information for the specified path string. | |
static xtd::ustring | get_extension (const xtd::ustring &path) |
Returns the extension of the specified path string. | |
static xtd::ustring | get_file_name (const xtd::ustring &path) |
Returns the file name and extension of the specified path string. | |
static xtd::ustring | get_file_name_without_extension (const xtd::ustring &path) |
static xtd::ustring | get_full_path (const xtd::ustring &path) |
Returns the absolute path for the specified path string. | |
template<typename char_t > | |
static std::vector< char_t > | get_invalid_path_chars () noexcept |
Gets an array containing the characters that are not allowed in path names. | |
static std::vector< char > | get_invalid_path_chars () noexcept |
Gets an array containing the characters that are not allowed in path names. | |
static xtd::ustring | get_path_root (const xtd::ustring &path) |
Gets the root directory information of the specified path. | |
static xtd::ustring | get_random_file_name () |
Returns a random folder name or file name. | |
static xtd::ustring | get_temp_file_name () |
Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file. | |
static xtd::ustring | get_temp_path () noexcept |
Returns the path of the current user's temporary folder. | |
static bool | has_extension (const xtd::ustring &path) |
Determines whether a path includes a file name extension. | |
static bool | is_path_rooted (const xtd::ustring &path) |
Gets a value indicating whether the specified path string contains absolute or relative path information. | |
template<typename char_t > | |
static char_t | path_separator () noexcept |
A platform-specific separator character used to separate path strings in environment variables. | |
static char | path_separator () noexcept |
A platform-specific separator character used to separate path strings in environment variables. | |
template<typename char_t > | |
static char_t | volume_separator_char () noexcept |
Provides a platform-specific volume separator character. | |
static char | volume_separator_char () noexcept |
Provides a platform-specific volume separator character. | |
|
inlinestaticnoexcept |
Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.
|
staticnoexcept |
Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.
|
static |
Changes the extension of a path string.
path | The path information to modify. The path cannot contain any of the characters defined in GetInvalidPathchar_ts. |
extension | The new extension (with or without a leading period). Specify null to remove an existing extension from path. |
|
staticnoexcept |
Combines path strings array.
paths | The path array. |
|
static |
Combines two path strings.
path1 | The first path. |
path2 | The second path. |
|
inlinestaticnoexcept |
Combines path strings array.
paths | The path array. |
|
inlinestaticnoexcept |
Combines three path strings.
path1 | The first path. |
path2 | The second path. |
path3 | The third path. |
|
inlinestaticnoexcept |
Combines four path strings.
path1 | The first path. |
path2 | The second path. |
path3 | The third path. |
path4 | The fourth path. |
|
inlinestaticnoexcept |
Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.
|
staticnoexcept |
Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.
|
static |
Returns the directory information for the specified path string.
path | the path of a file or directory. |
|
static |
Returns the extension of the specified path string.
path | The path string from which to get the extension. |
|
static |
Returns the file name and extension of the specified path string.
path | The path string from which to obtain the file name and extension. |
|
static |
Returns the absolute path for the specified path string.
path | The file or directory for which to obtain absolute path information. |
|
inlinestaticnoexcept |
Gets an array containing the characters that are not allowed in path names.
|
staticnoexcept |
Gets an array containing the characters that are not allowed in path names.
|
static |
Gets the root directory information of the specified path.
path | The path from which to obtain root directory information. |
|
static |
Returns a random folder name or file name.
|
static |
Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file.
|
staticnoexcept |
Returns the path of the current user's temporary folder.
|
static |
Determines whether a path includes a file name extension.
path | The path to search for an extension. |
|
static |
Gets a value indicating whether the specified path string contains absolute or relative path information.
path | The path to test. |
|
inlinestaticnoexcept |
A platform-specific separator character used to separate path strings in environment variables.
|
staticnoexcept |
A platform-specific separator character used to separate path strings in environment variables.
|
inlinestaticnoexcept |
Provides a platform-specific volume separator character.
|
staticnoexcept |
Provides a platform-specific volume separator character.