-
Notifications
You must be signed in to change notification settings - Fork 775
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
fs.copy/copySync when filter is return false, it will break copy #1007
Comments
|
but if allow folder return true, it will copy a lot of empty folder |
Honestly, the filter probably isn't the best tool for the job here, you'd be better off using something like https://www.npmjs.com/package/globby to get a list of JS files, then copying each of them individually. |
Could you consider adding support for glob matching in the first parameter? fs.copy('src/**/*.png', dest) |
Glob support adds another entire layer of complexity and edge cases to deal with, it's unlikely we'll add it. |
when I copying a folder, I wish skip file it is not *.js ,but if I return false, it will break copy, the desired purpose is to copy all non-.js files
fs-extra
version:The text was updated successfully, but these errors were encountered: