Skip to content

Allow a recursive option on rmdir #71

@amxmln

Description

@amxmln

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 😅). 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! 🎉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions