Skip to content

Instantly share code, notes, and snippets.

View izanagi1995's full-sized avatar

Nicolas Surleraux izanagi1995

  • Belgium
View GitHub Profile
function readDir(start, callback) {
// Use lstat to resolve symlink if we are passed a symlink
fs.lstat(start, function(err, stat) {
if(err) {
return callback(err);
}
var found = {dirs: [], files: []},
total = 0,
processed = 0;
function isDir(abspath) {