node-recursive-directory

1.2.0 • Public • Published

node-recursive-directory

Npm package to get directory files recursively

Usage:

Just list of files

const getFiles = require('node-resursive-directory');
 
(async () => {
    const files = await getFiles('/home');
    console.log(files);
})

Get list of files as object with parsed data:

const getFiles = require('node-resursive-directory');
 
(async () => {
    const files = await getFiles('/home', true); // add true
    console.log(files);
})

You will get something like that:

  [
      ...,
      {
        fullpath: '/home/vvm/Downloads/images/Some/Some Image.jpg',
        filepath: '/home/vvm/Downloads/images/Some/',
        filename: 'Some Image.jpg',
        dirname: 'Some'
    },
  ]

Readme

Keywords

none

Package Sidebar

Install

npm i node-recursive-directory

Weekly Downloads

2,035

Version

1.2.0

License

ISC

Unpacked Size

2.29 kB

Total Files

3

Last publish

Collaborators

  • vvmspace