Skip to content

Instantly share code, notes, and snippets.

Eyal Arubas EyalAr

Block or report user

Report or block EyalAr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AndrewRayCode
AndrewRayCode / gist:825583
Created Feb 14, 2011
recursive read directory in node.js returning flattened list of files and directories
View gist:825583
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) {
You can’t perform that action at this time.