Skip to content

Instantly share code, notes, and snippets.

View funkyeah's full-sized avatar

funkyeah funkyeah

View GitHub Profile
@mikeal
mikeal / gist:293922
Created February 3, 2010 19:23
walk(pathname,callback) for node.js
var http = require('http'),
sys = require('sys'),
path = require('path'),
posix = require('posix'),
events = require('events');
var listdir = function (pathname) {
var p = new events.Promise();
var ls = process.createChildProcess("ls", [pathname]);
ls.addListener("output", function (data) {