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: Ability to pass a function to ignore #25

Closed
Ajedi32 opened this issue Oct 16, 2015 · 3 comments
Closed

Feature request: Ability to pass a function to ignore #25

Ajedi32 opened this issue Oct 16, 2015 · 3 comments

Comments

@Ajedi32
Copy link
Contributor

Ajedi32 commented Oct 16, 2015

To make the current system for ignoring files much more powerful, it would be great if we could pass a function to ignore instead of just minimatch strings. The function would take in the file path and lstat object, and return true to ignore the file, or false to keep it.

This would add a lot of power to recursive-readdir's ignore system, addressing both the use cases of #14 and my comments on e2f2ea0 in one fell swoop. It would also really help with some of the problems we've discussed in #23.

@Ajedi32
Copy link
Contributor Author

Ajedi32 commented Oct 16, 2015

Also, just to note: I'm willing to contribute a PR here if you think this is a feature you'd be willing to add.

@jergason
Copy link
Owner

This would be fantastic. I'm a bit wary of complicating a dirt-simple module by trying to support more complex ignoring behaviors, and as you can see I've already added some wonkiness trying to do so.

@Ajedi32
Copy link
Contributor Author

Ajedi32 commented Oct 16, 2015

Awesome. I'll look into this and probably submit a PR over the weekend. Seems like it should be pretty straightforward to implement.

Ajedi32 added a commit to Ajedi32/recursive-readdir that referenced this issue Oct 17, 2015
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

2 participants