std::experimental::filesystem::absolute

From cppreference.com
< cpp‎ | experimental‎ | fs
Defined in header <experimental/filesystem>
path absolute( const path& p, const path& base = current_path() );
(filesystem TS)

Returns absolute path of p relative to base according to the following table:

p.has_root_directory()  !p.has_root_directory()
p.has_root_name() return p return p.root_name() / absolute(base).root_directory()

/ absolute(base).relative_path() / p.relative_path()

 !p.has_root_name() absolute(base).root_name() / p return absolute(base) / p

Contents

[edit] Parameters

[edit] Return value

[edit] Exceptions

[edit] Notes

The returned path is always absolute.

[edit] See also