void clear() noexcept;
Postconditions: empty() == true.
path& make_preferred();
[ Example:
path p("foo/bar"); std::cout << p << '\n'; p.make_preferred(); std::cout << p << '\n';
On an operating system where preferred-separator is a slash, the output is:
"foo/bar" "foo/bar"
On an operating system where preferred-separator is a backslash, the output is:
"foo/bar" "foo\bar"
— end example ]
path& remove_filename();
Postconditions: !has_filename().
Effects: Remove the generic format pathname of filename() from the generic format pathname.
[ Example:
path("foo/bar").remove_filename(); path("foo/").remove_filename(); path("/foo").remove_filename(); path("/").remove_filename();
— end example ]
path& replace_filename(const path& replacement);
Effects: Equivalent to:
remove_filename(); operator/=(replacement);
[ Example:
path("/foo").replace_filename("bar"); path("/").replace_filename("bar");
— end example ]
path& replace_extension(const path& replacement = path());
Effects:
Any existing extension()([fs.path.decompose]) is removed from the pathname in the generic format, then
If replacement is not empty and does not begin with a dot character, a dot character is appended to the pathname in the generic format, then
operator+=(replacement);.
void swap(path& rhs) noexcept;
Effects: Swaps the contents (in all formats) of the two paths.
Complexity: Constant time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4