This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function readAllHelps (cb) { | |
var help_text = [] | |
, didError = false | |
function error (er) { | |
if (didError) return undefined | |
didError = true | |
cb(er) | |
} | |
fs.readdir('help', function(er, files) { | |
if (err) return error(er) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var help_text = []; | |
fs.readdir('help', function(err, files) { | |
if (err) throw err; | |
for(var i = 0; i < files.length; i++) { | |
fs.readFile('help/'+files[i], function(err, data) { | |
if(err) throw err; | |
help_text[file_name????] = data; | |
}); | |
} | |
}); |