bool copy_file(const path& from, const path& to);
bool copy_file(const path& from, const path& to, error_code& ec) noexcept;
Returns: copy_file(from, to, copy_options::none) or
copy_file(from, to, copy_options::none, ec), respectively
. bool copy_file(const path& from, const path& to, copy_options options);
bool copy_file(const path& from, const path& to, copy_options options,
error_code& ec) noexcept;
Effects:
As follows:
Report a file already exists error as specified in
[fs.err.report] if:
!is_regular_file(from), or
exists(to) and !is_regular_file(to), or
exists(to) and equivalent(from, to), or
exists(to) and
(options & (copy_options::skip_existing |
copy_options::overwrite_existing |
copy_options::update_existing)) == copy_options::none
Otherwise, copy the contents and attributes of the file
from
resolves to, to the file
to resolves to, if:
Returns: true if the
from file
was copied, otherwise
false. The signature with argument
ec returns
false if an error occurs
.Complexity: At most one direct or indirect invocation of
status(to).