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

recursive option for fs.rmdir #27764

Closed
silverwind opened this issue May 18, 2019 · 3 comments
Closed

recursive option for fs.rmdir #27764

silverwind opened this issue May 18, 2019 · 3 comments
Labels
feature request Issues that request new features to be added to Node.js. fs Issues and PRs related to the fs subsystem / file system.

Comments

@silverwind
Copy link
Contributor

silverwind commented May 18, 2019

fs.mkdir gained a recursive option in 10.12 (providing alternative to the mkdirp module) and I think the popularity of the rimraf module speaks for itself that there is very high userland to justify having it on fs.rmdir and it's variants too.

Examples of other languages implementing similar functionality are golang's os.RemoveAll or python's shutil.rmtree.

@silverwind silverwind added fs Issues and PRs related to the fs subsystem / file system. feature request Issues that request new features to be added to Node.js. labels May 18, 2019
@silverwind
Copy link
Contributor Author

If we are to implement this in JS, we can use the withFileTypes of fs.readdir to skip on stat calls which will outperform the current implementation of rimraf.

@cjihrig
Copy link
Contributor

cjihrig commented May 18, 2019

Related work that stalled out due to performance concerns: #24252

@silverwind
Copy link
Contributor Author

Okay, so this is a duplicate of #22686, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

No branches or pull requests

2 participants