19 lines
No EOL
383 B
JavaScript
19 lines
No EOL
383 B
JavaScript
const fs = require('fs')
|
|
|
|
module.exports = function (path) {
|
|
let subdir = fs.readdirSync(path)
|
|
let commandFiles = [];
|
|
if(fs.statSync(path+subdir).isDirectory()){
|
|
goDeeper(path+subdir, commandFiles);
|
|
}else if(subdir.endsWith(".js")){
|
|
commandFiles.push(path+subdir)
|
|
}
|
|
|
|
|
|
//return commandFiles // ARRAY OF FILES ENDING WITH .js
|
|
}
|
|
|
|
|
|
function goDeeper(subdir, commandFiles){
|
|
|
|
} |