Files
2025-10-25 03:02:53 +03:00

1.9 KiB

[fs.op.weakly.canonical]

31 Input/output library [input.output]

31.12 File systems [filesystems]

31.12.13 Filesystem operation functions [fs.op.funcs]

31.12.13.40 Weakly canonical [fs.op.weakly.canonical]

🔗

path filesystem::weakly_canonical(const path& p); path filesystem::weakly_canonical(const path& p, error_code& ec);

1

#

Effects: Using status(p) or status(p, ec), respectively, to determine existence, return a path composed by operator/= from the result of calling canonical with a path argument composed of the leading elements of p that exist, if any, followed by the elements of p that do not exist, if any.

For the first form, canonical is called without an error_code argument.

For the second form, canonical is called with ec as an error_code argument, and path() is returned at the first error occurrence, if any.

2

#

Postconditions: The returned path is in normal form ([fs.path.generic]).

3

#

Returns: p with symlinks resolved and the result normalized ([fs.path.generic]).

4

#

Throws: As specified in [fs.err.report].