void copy(const path& from, const path& to);
void copy(const path& from, const path& to, error_code& ec) noexcept;
void copy(const path& from, const path& to, copy_options options);
void copy(const path& from, const path& to, copy_options options,
error_code& ec) noexcept;
(options & copy_options::create_symlinks) != copy_options::none || (options & copy_options::skip_symlinks) != copy_options::nonethen auto f = symlink_status(from) and if needed auto t = symlink_status(to).
(options & copy_options::copy_symlinks) != copy_options::nonethen auto f = symlink_status(from) and if needed auto t = status(to).
!exists(t) && (options & copy_options::copy_symlinks) != copy_options::nonethen copy_symlink(from, to).
is_directory(f) && ((options & copy_options::recursive) != copy_options::none || options == copy_options::none)then:
for (const directory_entry& x : directory_iterator(from))
copy(x.path(), to/x.path().filename(), options | copy_options::unspecified)
/dir1 file1 file2 dir2 file3Calling copy("/dir1", "/dir3") would result in:
/dir1 file1 file2 dir2 file3 /dir3 file1 file2Alternatively, calling copy("/dir1", "/dir3", copy_options::recursive) would result in:
/dir1 file1 file2 dir2 file3 /dir3 file1 file2 dir2 file3