walk the file tree synchronously, asynchronous it is meaningless to "VISIT_RESULT" for this library.
Usage
Example
let fileTreeWalker=require("file-tree-walker");
let {VISIT_RESULT}=require("file-tree-walker");
let path=require("path");
fileTreeWalker.walkFileTree(path.resolve("C:/","windows"),{
perVisitDirectory(dir,stat)
{
return VISIT_RESULT.CONTINUE;
},
postVisitDirectory(dir,stat,error)
{
if(error)
{
console.log(error);
}
return VISIT_RESULT.CONTINUE;
},
visitFileFailed(file,error)
{
if(error)
{
console.log(error);
}
return VISIT_RESULT.CONTINUE;
},
postVisitFile(file,stat)
{
console.log(file);
return VISIT_RESULT.CONTINUE;
}
},{
maxDepth:2
});