std::experimental::filesystem::copy_file

From cppreference.com
< cpp‎ | experimental‎ | fs
Defined in header <experimental/filesystem>
bool copy_file( const path& from, const path& to );
(1) (filesystem TS)
bool copy_file( const path& from, const path& to,
                error_code& ec );
(2) (filesystem TS)
bool copy_file( const path& from, const path& to, copy_options options );
(3) (filesystem TS)
bool copy_file( const path& from, const path& to, copy_options options,
                error_code& ec );
(4) (filesystem TS)

Copies file contents and their attributes.

1) Equivalent to copy_file(from, to, copy_options::none).
2) Equivalent to copy_file(from, to, copy_options::none, ec).

The functions involve at most one direct or indirect call to status(to).

Contents

[edit] Parameters

ec - error code to store error status to

[edit] Return value

[edit] Exceptions

2,4)
noexcept specification:  
noexcept
  

[edit] See also