mirror of
https://github.com/danbulant/console-hub
synced 2026-05-19 04:18:45 +00:00
14 lines
353 B
JavaScript
14 lines
353 B
JavaScript
// files.js
|
|
var fs = require('fs');
|
|
var path = require('path');
|
|
module.exports = {
|
|
fs: require('fs'),
|
|
path: require('path'),
|
|
walkDir: function(dir, callback){
|
|
fs.readdirSync(dir).forEach( f => {
|
|
let dirPath = path.join(dir, f);
|
|
let isDirectory = fs.statSync(dirPath).isDirectory();
|
|
callback(path.join(dir, f));
|
|
});
|
|
}
|
|
}
|