You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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').
The text was updated successfully, but these errors were encountered:
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.
It would be great to have a
filter
-like option oncopy
where the function would be async (with a callback) (useful forfs.stat(item)
).And/or have a
filter
-like option where the function is called not with a stringpath
, but with the result offs.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 tofs.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').
The text was updated successfully, but these errors were encountered: