mantid
mantid copied to clipboard
Migrate from Poco::File and Poco::Path to std::filesystem - c++17
Describe the outcome that is desired. As of C++17 std:filesystem has the necessary functionality for most filesystem operations. Move from using Poco to using the std library.
Recipies for migrating
-
Poco::File(filename).exists()
->std::filesystem::exists(filename)
-
Poco::File(filename).isDirectory()
->std::filesystem::is_directory(filename)
-
Poco::File(filename).remove()
->std::filesystem::remove(filename)
-
Poco::File(filename).createDirectory()
->std::filesystem::create_directory(filename)
- exceptions generated are
std::filesystem::filesystem_error
-
extension = "." + Poco::Path(filename).getExtension()
->extension = std::filesystem::path(filename).extension().string()