npm.io
0.2.1 • Published 10 years ago

get-files-in-dir

Licence
MIT
Version
0.2.1
Deps
1
Vulns
0
Weekly
0
Stars
1

get-files-in-dir - Given a path, retrieves all matching files.

Installation

npm install get-files-in-dir --save

Usage

var getFiles = require("get-files-in-dir");

function endsWithTxt(filename){
	return filename.lastIndexOf(".txt") === (filename.length - 4);
}
var matchingFiles = getFiles('somePath', includeSubdirs, endsWithTxt);

Keywords