isomorphic-git / isomorphic-git/lightning-fs
Allow a recursive option on rmdir
- Dominant language
- JavaScript
- Stars
- 610
- Forks
- 62
- Avg merge
- 14h 47m
- Merged PRs (30d)
- 1
Description
The `rmdir` function in newer versions of Node allows for a `recursive` option that when set to `true` makes the command behave more like a `rm -rf`, which I think can be very useful in many situations (such as deleting a cloned but no longer needed git repo for example).
The documentation of `lightning-fs` suggests that its `rmdir` also takes an options object, but I browsing through the source I couldn’t find anything that seemed to be using that object (I might have missed something though :sweat_smile:). I feel like adding a native `recursive` option could really benefit the library and perhaps would even allow for a more efficient way than a recursive "rimraf" implemented on top of the library, since if I understood the structure of `lightning-fs` correctly it should be possible to just gather a list of all inodes contained in the directory, delete them and then delete the directory itself in a single transaction, right?
Sorry if that suggested solution is useless, but I hope the rest of my point still stands.
Keep up the great work! :tada:
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.