std::experimental::filesystem::path (3) - Linux Manuals
std::experimental::filesystem::path: std::experimental::filesystem::path
NAME
std::experimental::filesystem::path - std::experimental::filesystem::path
Synopsis
Defined in header <experimental/filesystem>
class path; (filesystem TS)
Objects of type path represent paths on a filesystem. Only syntactic aspects of paths are handled: the pathname may represent a non-existing path or even one that is not allowed to exist on the current file system or OS.
The path name has the following syntax:
The path can be traversed element-wise via iterators returned by the begin() and end() functions, which iterates over root name, root directory, and the subsequent file name elements (directory separators are skipped except the one that identifies the root directory). If the very last element in the path is a directory separator, the last iterator will dereference to a file name dot.
Calling any non-const member function of a path invalidates all iterators referring to elements of that object.
If the OS uses a native syntax that is different from the portable generic syntax described above, all library functions accept path names in both formats.
Paths are implicitly convertible to and from std::basic_strings, which makes it possible to use them with other file APIs, e.g. as an argument to std::ifstream::open
Member types
Type Definition
value_type character type used by the native encoding of the filesystem: char on POSIX, wchar_t on Windows
string_type std::basic_string<value_type>
const_iterator a constant LegacyBidirectionalIterator with a value_type of path
iterator an alias to const_iterator
Member constants
constexpr value_type preferred_separator alternative directory separator which may be used in addition to the portable /. On Windows, this is the backslash character \. On POSIX, this is the same forward slash / as the portable separator
[static]
Member functions
constructor (public member function)
destructor (public member function)
operator= (public member function)
assign (public member function)
Concatenation
append (public member function)
operator/=
concat (public member function)
operator+=
Modifiers
clear (public member function)
make_preferred (public member function)