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

filter parameter fs.copy and fs.copySync #36

Merged
merged 3 commits into from
Oct 14, 2013
Merged

filter parameter fs.copy and fs.copySync #36

merged 3 commits into from
Oct 14, 2013

Conversation

sri-rang
Copy link
Contributor

Both fs.copy and fs.copySync have a new parameter filter which behaves like a whitelist.

filter can be a function or a regular expression

  • for filter:function, filter(srcPath) must be true for copy
  • for filter:RegExp, filter.test(srcPath) must be true for copy

filter is optional for both fs.copy() and fs.copySync()

`filter` can be a function or a regular expression

for filter:function, `filter(src)` must be true for copy
for filter:RegExp, `filter.test(src)` must be true for copy
jprichardson added a commit that referenced this pull request Oct 14, 2013
`filter` parameter `fs.copy` and `fs.copySync`
@jprichardson jprichardson merged commit 299dd2d into jprichardson:master Oct 14, 2013
@jprichardson
Copy link
Owner

Cool, thanks!

@jprichardson
Copy link
Owner

Published.

ovr pushed a commit to ovr/node-fs-extra that referenced this pull request Nov 12, 2020
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

Successfully merging this pull request may close these issues.

2 participants