Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

copy_file Function

Copies the attributes and contents in one file and pastes them in another file.

template<class Path1, class Path2>
inline void copy_file(
   const Path1& Pval1,
   const Path2& Pval2,
   copy_option Opt = copy_option::fail_if_exists


A Path object that contains the source file name. Path can be either a basic_path or a type that is derived from basic_path.


A Path object that contains the destination file name.


A copy_option value that specifies function behavior if the destination file already exists. For more information, see copy_option Enumeration.

Header: filesystem

Namespace: std::tr2::sys

© 2015 Microsoft