Hey this tool are awesome thanks.
One thing, we really need support ignore all
Any tips to do this
Example i want allow only if is a files, and the extension is .json and .webm
const scanDATA2 = () => {
const recursive = require('recursive-readdir');
function ignoreFunc(file, stats) {
const isDirectory = stats.isDirectory();
if(stats.isDirectory()){
return file.contains('SOURCE') || file.contains('source');
}else
if(stats.isFile()){
return !(['.json','.webm'].contains(file));
};
};
recursive("data2", [ignoreFunc], (err, files) => {
files.forEach(PATH => {
const split = PATH.replace('.','\\').split('\\');
const name = split[split.length-2];
if(name.contains('-')){ // isMultipack
const _name = name.split('-')[0]; // nom sans -0
!this.LINKS[_name] && (this.LINKS[_name] = []);
this.LINKS[_name].push( {name:name,path:PATH.replace(/\\/g,"/")} );
}else{
this.LINKS[name] = PATH.replace(/\\/g,"/");
};
});
return nextStep();
});
};
the issue with the ignore files, is if a user add a new file in folder, it will scan.
Hey this tool are awesome thanks.
One thing, we really need support ignore all
Any tips to do this
Example i want allow only if is a files, and the extension is
.jsonand.webmthe issue with the ignore files, is if a user add a new file in folder, it will scan.