Hi,
The Windows API function CopyFile
has an argument BOOL bFailIfExists
that allows you to control whether or not you want to overwrite the target file if it exists.
The boost::filesystem
copy_file
function has no such argument, and will fail if the target file exists. Is there an elegant way to use the boost copy_file function and overwrite the target file? Or is it better to simply use the Windows API? My current target platform is Windows, but I prefer to use STL and boost where possible to keep my code platform independent.
Thank you.