why shut my copy task when i wanna to copy a dir with use filter function
See original GitHub issueexample:
fs.copy(srcDir, destDir, {
filter: () => {
console.log('run filter')
return false
},
}, (err) => {
if (err) return console.error(err);
console.log('success!');
});
shut down in first file copy!
i have no idea why about use cb()
when run handleFilter
. maybe i just wanna copy a dir and hope to filter some file which i dont want to copy
is this a reasonable design?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9
Top Results From Across the Web
FastCopy Help (en)
Filter Options. It can Include/Exclude the copy target files/directories that match/unmatch by filters. Select the "listing" button to confirm ...
Read more >Copy Task - MSBuild | Microsoft Learn
Learn how to use the MSBuild Copy task to copy files to a new file or folder location in the file system.
Read more >Filtered Operations - Directory Opus
Copy Files: When copying or moving files, filtering is enabled by selecting the Copy Filter option in the drop-down attached to the Copy...
Read more >Level up with these advanced PowerShell commands to copy ...
For example, the command below only copies files with a 6 in the filename. Combine the Path, Filter, Include or Exclude parameters to...
Read more >1. File Operations - Gradle Beyond the Basics [Book] - O'Reilly
At execution, a copy task copies files into a destination directory from one ... The expand() and filter() methods apply the same transformation...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’re consistently returning
false
from yourfilter
, which indicates you don’t want to copy anything, so fs-extra just stops.Fixed in https://github.com/jprichardson/node-fs-extra/pull/554, will be in the next release later this month.