mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Migrate from Poco::File and Poco::Path to std::filesystem - c++17

Open peterfpeterson opened this issue 6 months ago • 0 comments

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()

some common std::filesystem operations

peterfpeterson avatar Aug 23 '24 13:08 peterfpeterson