Skip to content

Recursively get full absolute paths of all files in a given directory

License

Notifications You must be signed in to change notification settings

AlexeyGorokhov/directory-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

directory-files

Recursively get full absolute paths of all files in a given directory

js-semistandard-style

Installation

$ npm install directory-files --save

Usage

const path = require('path');
const directoryFiles = require('directory-files');

const dir = path.join(__dirname, 'some/folder');
const fileNames = directoryFiles(dir);
for (const fileName of fileNames) {
  console.log(fileName);
}

API

directoryFiles(dir)

Type: {Function}

  • {String} dir - Absolute path to a directory.

Return: Array{String} - An array of full absolute paths.

About

Recursively get full absolute paths of all files in a given directory

Resources

License

Stars

Watchers

Forks

Packages

No packages published