AIO Get All Files its a simple get all files module to get all files path. This package its usefull for build some discord bot, and the others.
This module allow you to get files with a lot method, and make you easier to get all files without making new file to get files.
And thanks to choosing aio-get-all-files for your get all files node.js module.
This Module Inspired By: NotUnderCtrl
With npm :
npm i aio-get-all-files
const aio = require("aio-get-all-files");
/**
For method like `getAllFiles`, `getFiles`, `getAllFilesWithoutType`, & `instant`
*/
aio.<METHODS>("PATH", options);
Returns an array of all files and directories in a given directory.
aio.getAllFiles("PATH", {
ext, // The file extension to filter by
sync, // The return of output, like `true` as Array<String> and `false` as Promise<Array<String>>
foldersOnly // Whether to include only directories or not
});
Returns an array of files in a given directory
aio.getFiles("PATH", {
ext, // The file extension to filter by
sync, // The return of output, like `true` as Array<String> and `false` as Promise<Array<String>>
foldersOnly // Whether to include only directories or not
});
Returns an array of all files and directories in a given directory without type information.
aio.getAllFilesWithoutType("PATH", {
ext, // The file extension to filter by
sync, // The return of output, like `true` as Array<String> and `false` as Promise<Array<String>>
});
Note: For the complete code you can go to oficial channel
When you run the code from the sample code the logs its like here:
[
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\file\\aio\\aio.js',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\file\\aio\\aio2\\aio22.js',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\file\\is.js',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\file\\oia\\oia.js'
]
[
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\file',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\file\\aio',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\file\\aio\\aio2',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\file\\oia',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\folder',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\folder\\1',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\folder\\1\\3',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\folder\\2',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\folder\\2\\4',
'D:\\NodeTest Folder\\0Test package\\getAllFiles\\testfolder\\folder\\2\\4\\5'
]