diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-09-23 20:49:33 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-09-23 20:49:33 +0200 |
| commit | d82e972701165517517788b8b51eb089419a20cb (patch) | |
| tree | a66d517d50ba45801b76d515ef6133bc68f25ebe /src | |
| parent | 6fba38bd59450e167e664153a31f41e97a500ffc (diff) | |
Revert "Remove unused change_extension()."
This reverts commit 6d1a7e90ec3244b8e532e03c5209d5e8448f422e.
It is used in DCP-o-matic, contrary to the comment.
Diffstat (limited to 'src')
| -rw-r--r-- | src/filesystem.cc | 8 | ||||
| -rw-r--r-- | src/filesystem.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/filesystem.cc b/src/filesystem.cc index bdd15039..cb38ddfe 100644 --- a/src/filesystem.cc +++ b/src/filesystem.cc @@ -297,6 +297,14 @@ dcp::filesystem::rename(boost::filesystem::path const& old_path, boost::filesyst } +/* We don't really need this but let's add it for completeness */ +boost::filesystem::path +dcp::filesystem::change_extension(boost::filesystem::path const& path, std::string const& new_extension) +{ + return boost::filesystem::change_extension(path, new_extension); +} + + #ifdef DCPOMATIC_WINDOWS dcp::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const& path) diff --git a/src/filesystem.h b/src/filesystem.h index 1d434200..679be1f9 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -47,6 +47,7 @@ namespace filesystem boost::filesystem::path absolute(boost::filesystem::path const& path); boost::filesystem::path canonical(boost::filesystem::path const& path); boost::filesystem::path weakly_canonical(boost::filesystem::path const& path); +boost::filesystem::path change_extension(boost::filesystem::path const& from, std::string const& new_extension); 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); |
