Skip to content

dan-nl/get-directory-file-list

Repository files navigation

get-directory-file-list

NPM version Build Status Coverage Status

a directory helper that returns a Promise containing an array of the files found in a directory ( not recursive )

table of contents

installation

npm install get-directory-file-list

api

/**
 * @param {string} directory an absolute path
 * @returns {Array}
 */
 function getDirectoryFileList( directory )

usage

var getDirectoryFileList = require( 'get-directory-file-list' )
var path = require( 'path' )

getDirectoryFileList( path.join( __dirname, 'a-directory' ) )
  .then(
    function ( files ) {
      ...
    }
  )
  .catch(
    function( err ) {
      ...
    }
  )

license

MIT License

About

a directory helper that returns a Promise containing an array of the files found in a directory

Resources

License

Stars

Watchers

Forks

Packages

No packages published