Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

added removeDirectory and getDirectorySize #1988

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WebFreak001
Copy link
Contributor

first I thought the file module was async using fibers etc but as it just calls phobos I made these functions just use phobos too.

@s-ludwig
Copy link
Member

I think getDirectorySize may be a bit too high-level and too application specific for the API. rmdirRecurse on the other hand, even if on a similar abstraction level, is presumably used much more frequently, so that would still fit in. It should be named removeDirectoryRecursively or similar, though, so that nobody accidentally confuses the semantics with a plain rmdir.

For these kinds of recursive operations, which could easily block the thread for minutes, it also becomes apparent that all they really need to be moved into a thread pool at some point. Dog feeding async/Future!T would make sense, since this is currently in little use and barely tested. This doesn't need to happen as part of this PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants