[fs.op.copy.file] (original) (raw)

31 Input/output library [input.output]

31.12 File systems [filesystems]

31.12.13 Filesystem operation functions [fs.op.funcs]

31.12.13.5 Copy file [fs.op.copy.file]

bool filesystem::copy_file(const path& from, const path& to);bool filesystem::copy_file(const path& from, const path& to, error_code& ec);

Returns: copy_file(from, to, copy_options​::​none) or

copy_file(from, to, copy_options​::​none, ec), respectively.

bool filesystem::copy_file(const path& from, const path& to, copy_options options);bool filesystem::copy_file(const path& from, const path& to, copy_options options, error_code& ec);

Preconditions: At most one element from each option group ([fs.enum.copy.opts]) is set in options.

Effects: As follows:

Returns: true if the from file was copied, otherwise false.

The signature with argument ec returnsfalse if an error occurs.

Complexity: At most one direct or indirect invocation of status(to).