diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-09-23 23:12:41 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-09-23 23:12:41 +0200 |
| commit | adae04e0984d294aa9a95394bfed584ce7e93469 (patch) | |
| tree | d547dca1e630961d5d1d9226bebb4aa343fa317f /src/filesystem.h | |
| parent | 466a21fbf04f9b5ee1bcddc0f9cee6c454799006 (diff) | |
Fix the boost copy_option{,s} change a different way.
The previous solution required the correct define to be present when
including libdcp, which seems a bit awkward.
Diffstat (limited to 'src/filesystem.h')
| -rw-r--r-- | src/filesystem.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/filesystem.h b/src/filesystem.h index 679be1f9..a06dc69e 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -51,11 +51,14 @@ boost::filesystem::path change_extension(boost::filesystem::path const& from, st void copy(boost::filesystem::path const& from, boost::filesystem::path const& to); void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to); void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::system::error_code& ec); -#ifdef LIBDCP_HAVE_COPY_OPTIONS -void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::filesystem::copy_options ec); -#else -void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::filesystem::copy_option ec); -#endif + +enum class CopyOptions +{ + NONE, + OVERWRITE_EXISTING +}; + +void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, CopyOptions options); bool create_directory(boost::filesystem::path const& path); bool create_directory(boost::filesystem::path const& path, boost::system::error_code& ec); bool create_directories(boost::filesystem::path const& path); |
