Skip to content

Conversation

@ab9rf
Copy link
Member

@ab9rf ab9rf commented Mar 17, 2025

Recode most uses of std::string to represent a path name to use std::filesystem::path instead. Replace most of old crunchy filesystem module with std::filesystem equivalents

Some modules have also cleaned to address using filesystem std and/or missing or unnecessary #includes

The atime, ctime, and filetype methods of the Filesystem module have been removed because they're POSIX-specific, not supported by std::filesystem, and unused in DFHack

ab9rf added 3 commits March 17, 2025 09:27
Recode most uses of `std::string` to represent a path name to use `std::filesystem::path` instead. Eliminate most of old crunchy filesystem module with `std::filesystem` equivalent methods

some modules have also cleaned to remove `using filesystem std` and/or missing or unnecessary `#include`s

note: the `atime`, `ctime`, and `filetype` methods of the `Filesystem` module have been removed because they're POSIX-specific, not supported by `std::filesystem`, and unused in DFHack
really wish we could use `std::format`
@ab9rf
Copy link
Member Author

ab9rf commented Mar 17, 2025

it would appear that i need to rewrite the tests for Filesystem :)

return;

std::string rawFolder = !isWorldLoaded() ? "" : "save/" + World::ReadWorldFolder() + "/init";
std::filesystem::path rawFolder = !isWorldLoaded() ? std::filesystem::path{} : std::filesystem::path{} / "save" / World::ReadWorldFolder() / "init";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this path is deprecated, but we can address that in another PR

@github-project-automation github-project-automation bot moved this from Todo to Review In Progress in 51.08-r2 Mar 22, 2025
@myk002 myk002 merged commit 6a9919d into DFHack:develop Mar 22, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in 51.08-r2 Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants