Skip to content

Creates file list for a directory in a recursive and efficient manner.

License

Notifications You must be signed in to change notification settings

TechnicalRhino/list-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

List files, walks a folder and gives you the list of files recursively from all the sub-folders in the directory. Returns a array of files that is there in the folder.

const readFilesAsyncPromise = require("@agnibha/list-files").readFilesAsyncPromise;
const readFilesAsync = require("@agnibha/list-files").readFilesAsync;
const readFilesSync = require("@agnibha/list-files").readFilesSync;

readFilesAsyncPromise("*your-directory*").then(files => {
    console.log(files.length);
}).catch(error => {
    console.error(error);
});

readFilesAsync("*your-directory*", (err, results) => {
    console.log(results.length);
});

console.log(readFilesSync("*your-directory*").length);

About

Creates file list for a directory in a recursive and efficient manner.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published