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

exclude filter in fs.copy #65

Closed
jjude opened this issue Jun 12, 2014 · 4 comments
Closed

exclude filter in fs.copy #65

jjude opened this issue Jun 12, 2014 · 4 comments

Comments

@jjude
Copy link

jjude commented Jun 12, 2014

Is it possible to exclude certain files in fs.copy? Say I want to exclude .css files?
Thanks

@jprichardson
Copy link
Owner

Sure, pass in a RegExp as the third param:

fs.copy(src, dest, regexp, callback)

@martinheidegger
Copy link

@jprichardson Arn't the RegExp's include filters? Difference being that the result needs to be true to be included and not true to be excluded?

@khurramraheel
Copy link

Should we use /.mp3/ regex in case of only copying the mp3s?

@grantholle
Copy link

Passing a function as the third argument (RegEx is deprecated) where the return value indicates whether to copy the file/directory or not.

True copies, false does not.

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

5 participants