Skip to content

Instantly share code, notes, and snippets.

View castrix's full-sized avatar
🎯
Focusing

Ihsan Fajar Ramadhan castrix

🎯
Focusing
View GitHub Profile
@adamwdraper
adamwdraper / Node.js File Looper
Created December 5, 2012 04:46
Loop through all files in a given directory with node.js
var fs = require('fs');
var walkPath = './';
var walk = function (dir, done) {
fs.readdir(dir, function (error, list) {
if (error) {
return done(error);
}