Trying to filter the list of items to not include anything that is hidden ex: ._helloFile or ._helloWorld.jpg
Seems to not be working correctly AND the files array that is passed to the callback still returns everything in the source folder rather than my filtered results. What am I doing wrong?
cpr(source, destination, {
//deleteFirst: true, //Delete "to" before
overwrite: true, //If the file exists, overwrite it
confirm: true, //After the copy, stat all the copied files to make sure they are there
filter:/^(^[_].*)*$/gmi
}, function(err, files) {
if(err){
console.log(err)
_self.logs = err;
}else{
console.log(files)
}
});
Trying to filter the list of items to not include anything that is hidden ex: ._helloFile or ._helloWorld.jpg
Seems to not be working correctly AND the files array that is passed to the callback still returns everything in the source folder rather than my filtered results. What am I doing wrong?