get-directory-file-list
v0.1.3
Published
a directory helper that returns a Promise containing an array of the files found in a directory
Downloads
22
Readme
get-directory-file-list
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 ) {
...
}
)