A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/fs.path.modifiers below:

[fs.path.modifiers]

30 Input/output library [input.output] 30.10 File systems [filesystems] 30.10.27 Class path [fs.class.path] 30.10.27.4 path members [fs.path.member] 30.10.27.4.5 path modifiers [fs.path.modifiers]

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:

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