A C++14 reimplementation of the path abstraction described in ISO/IEC TS 18822:2015 (N4100) / Boost.Filesystem.
More...
#include <filesystem.hpp>
|
|
| path (const path &other) |
|
| path (path &&other) noexcept |
|
| path (const string_type &source) |
|
| path (const char *source) |
|
path & | operator= (const path &other) |
|
path & | operator= (path &&other) noexcept |
|
path & | operator= (const string_type &source) |
|
path & | operator= (const char *source) |
|
path & | assign (const string_type &source) |
|
path & | operator/= (const path &other) |
|
path & | operator/= (const string_type &source) |
|
path & | operator/= (const char *source) |
|
path & | operator+= (const path &other) |
|
path & | operator+= (const string_type &source) |
|
path & | operator+= (const char *source) |
|
void | clear () noexcept |
|
path & | make_preferred () |
| | Convert any directory separators to the platform's preferred separator in-place and return this path.
|
| path | lexically_normal () const |
| | Return a normalized copy of this path.
|
|
const string_type & | native () const |
| | Return the path in the platform's native format.
|
|
const value_type * | c_str () const |
| | Return a NUL-terminated C-string in native format.
|
|
string_type | string () const |
| | Convenience alias for native().
|
|
string_type | generic_string () const |
| | For nomlib, generic and native strings are interchangeable.
|
|
iterator | begin () const |
|
iterator | end () const |
|
path | root_name () const |
|
path | root_directory () const |
|
path | root_path () const |
|
path | relative_path () const |
|
path | parent_path () const |
|
path | filename () const |
|
path | stem () const |
|
path | extension () const |
|
bool | has_root_name () const |
|
bool | has_root_directory () const |
|
bool | has_root_path () const |
|
bool | has_relative_path () const |
|
bool | has_parent_path () const |
|
bool | has_filename () const |
|
bool | has_stem () const |
|
bool | has_extension () const |
|
bool | is_absolute () const |
|
bool | is_relative () const |
|
bool | empty () const |
|
|
void | parse (const string_type &source) |
|
void | normalize () |
|
void | invalidate_cache () const |
|
void | rebuild_cache () const |
|
std::vector< path > | path_elements () const |
| | Break the path into its iteration elements (root-name, root-directory, and each path component).
|
|
| using | u8string_type = std::string |
| using | u16string_type = std::u16string |
|
| path (const u16string_type &source) |
|
| path (const std::wstring &source) |
|
path & | operator= (const u16string_type &source) |
|
path & | operator= (const std::wstring &source) |
|
path & | assign (const u16string_type &source) |
|
path & | assign (const std::wstring &source) |
|
u8string_type | u8string () const |
| | Return the path encoded as UTF-8.
|
|
u16string_type | u16string () const |
| | Return the path encoded as UTF-16.
|
|
std::wstring | wstring () const |
| | Return the path as a wide-character string.
|
|
u8string_type | generic_u8string () const |
| | Generic-string alias for u8string().
|
|
u16string_type | generic_u16string () const |
| | Generic-string alias for u16string().
|
|
std::wstring | generic_wstring () const |
| | Generic-string alias for wstring().
|
A C++14 reimplementation of the path abstraction described in ISO/IEC TS 18822:2015 (N4100) / Boost.Filesystem.
Objects of this class represent a path syntactically; they do not require the path to exist on the filesystem. Operations are modeled on the generic pathname grammar, with platform-specific adjustments for Windows root-names and preferred separators.
Definition at line 53 of file filesystem.hpp.
◆ string_type
| using nom::filesystem::path::string_type = std::string |
◆ u16string_type
| using nom::filesystem::path::u16string_type = std::u16string |
◆ u8string_type
| using nom::filesystem::path::u8string_type = std::string |
◆ value_type
| using nom::filesystem::path::value_type = char |
◆ lexically_normal()
| path nom::filesystem::path::lexically_normal |
( |
| ) |
const |
Return a normalized copy of this path.
Collapses redundant separators, removes '.' components, and applies '..' components lexically. The result does not consult the filesystem.
◆ absolute_
| bool nom::filesystem::path::absolute_ |
|
private |
◆ components_
| std::vector<string_type> nom::filesystem::path::components_ |
|
private |
◆ dirty_
| bool nom::filesystem::path::dirty_ |
|
mutableprivate |
◆ has_root_directory_
| bool nom::filesystem::path::has_root_directory_ |
|
private |
◆ has_trailing_separator_
| bool nom::filesystem::path::has_trailing_separator_ |
|
private |
◆ native_pathname_
| string_type nom::filesystem::path::native_pathname_ |
|
mutableprivate |
◆ preferred_separator
| const value_type nom::filesystem::path::preferred_separator |
|
static |
◆ root_name_
| string_type nom::filesystem::path::root_name_ |
|
private |
The documentation for this class was generated from the following file: