std::experimental::filesystem::canonical

From cppreference.com
Defined in header <experimental/filesystem>
path canonical( const path& p, const path& base = current_path() );
(1) (filesystem TS)
path canonical( const path& p, error_code& ec );
(2) (filesystem TS)
path canonical( const path& p, const path& base, error_code& ec );
(3) (filesystem TS)

Converts path p to a canonical absolute path, i.e. one that has no dot, dot-dot elements or symbolic links. p is optionally relative to base.

p must resolve to an existing file, otherwise error occurs.

The return path resolves to the same path as absolute(p, base (or absolute(p) for (2)}}.

Contents

[edit] Parameters

ec - error code to store error status to

[edit] Return value

The canonical absolute path of p, which is optionally relative to base.

[edit] Exceptions

[edit] See also

This site archives manuals. You are looking at an archived manual.
If you're looking for this specific version of this manual, you're in the right place. Otherwise, please check the version.