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

Feature Request: isEmpty #259

Closed
donaldpipowitch opened this issue Jul 12, 2016 · 3 comments
Closed

Feature Request: isEmpty #259

donaldpipowitch opened this issue Jul 12, 2016 · 3 comments

Comments

@donaldpipowitch
Copy link

It would be nice, if fs-extra would have a function which checks, if a directory is empty.

@jprichardson
Copy link
Owner

What's the use case?

@donaldpipowitch
Copy link
Author

donaldpipowitch commented Jul 13, 2016

Currently writing some sort of documentation linter which checks, if the examples/ directory in our projects is empty. Basically this is a more powerful fs.exists in my use case. (Thinking of it, isEmpty could also check if a file is empty, if it isn't a directory.)

A requirement for isEmpty would be to automatically ignore meta files like .DS_STORE on Mac OS X.

Example:

image

😄

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 25, 2016

Wouldn't be opposed to an isEmpty method with a filter option, but ignoring meta files would be rather unexpected. Should be in a separate lib IMO.

@jprichardson Reopen if you disagree.

@RyanZim RyanZim closed this as completed Oct 25, 2016
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

No branches or pull requests

3 participants