Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
peterfpeterson opened this issue Aug 23, 2024 · 0 comments
Open
Assignees
Labels
Maintenance Unassigned issues to be addressed in the next maintenance period.

Comments

@peterfpeterson
Copy link
Member

peterfpeterson commented Aug 23, 2024

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

See EWM 7150

@peterfpeterson peterfpeterson added the Maintenance Unassigned issues to be addressed in the next maintenance period. label Aug 23, 2024
@peterfpeterson peterfpeterson changed the title Migrate from Poco::File and Poco::Path to std::filesystem Migrate from Poco::File and Poco::Path to std::filesystem - c++17 Aug 26, 2024
peterfpeterson added a commit to peterfpeterson/mantid that referenced this issue Aug 28, 2024
peterfpeterson added a commit to peterfpeterson/mantid that referenced this issue Aug 28, 2024
peterfpeterson added a commit to peterfpeterson/mantid that referenced this issue Aug 28, 2024
@jclarkeSTFC jclarkeSTFC self-assigned this Jan 24, 2025
@jclarkeSTFC jclarkeSTFC moved this from Icebox to In progress in Mantid Maintenance Jan 24, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Maintenance Unassigned issues to be addressed in the next maintenance period.
Projects
Status: In progress
Development

No branches or pull requests

2 participants