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

copy filter: async function and/or function called with fs.stat result #196

Closed
thomas-riccardi opened this issue Nov 20, 2015 · 2 comments
Closed

Comments

@thomas-riccardi
Copy link

It would be great to have a filter-like option on copy where the function would be async (with a callback) (useful for fs.stat(item)).

And/or have a filter-like option where the function is called not with a string path, but with the result of fs.stat on it (in addition to the path of course). (This could still be useful even if async filter function is implemented, because it would avoid double call to fs.stat).

Currently since we have neither feature, it's not possible to filter by path type (for example: I want to keep dirs called 'bla', but not files called 'bla').

@jprichardson
Copy link
Owner

That makes sense. I'd like something like that too. Eventually, I'm going to rewrite copy on top of https://github.com/jprichardson/node-klaw. This would enable such behavior. This will be awhile before this happens. My priority is to get this module to 1.0. Closing and tagging as future.

@RyanZim
Copy link
Collaborator

RyanZim commented Apr 27, 2017

Filter function has been added, stat is under consideration in #220

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