{"_id":"node-find-files","_rev":"1954045","name":"node-find-files","description":"A Node Module for finding files by attributes. Originally developed to find files modified since a particular date.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"sudsy","email":"ben@rebas.com.au"}],"time":{"modified":"2021-12-13T11:41:16.000Z","created":"2013-03-26T03:58:06.351Z","1.0.0":"2020-07-26T03:23:43.705Z","0.0.4":"2015-03-19T22:56:05.311Z","0.0.3":"2015-03-19T01:21:03.485Z","0.0.2":"2013-03-26T04:08:28.965Z","0.0.1":"2013-03-26T03:58:06.351Z"},"users":{"itonyyo":true,"tregusti":true,"monjer":true},"author":{"name":"Ben Sudbury","email":"bsudbury@gmail.com"},"repository":{"type":"git","url":"git://github.com/sudsy/node-find-files.git"},"versions":{"1.0.0":{"name":"node-find-files","version":"1.0.0","description":"A Node Module for finding files by attributes. Originally developed to find files modified since a particular date.","homepage":"https://github.com/sudsy/node-find-files#readme","keywords":["find","files","recursive","mtime","last modified","nodejs","js"],"author":{"name":"Ben Sudbury","email":"bsudbury@gmail.com"},"dependencies":{"async":"0.2.6"},"devDependencies":{"@types/async":"^3.2.3","@types/jest":"^26.0.7","@types/node":"^14.0.26","jest":"^26.1.0","mock-fs":"^4.12.0","ts-jest":"^26.1.3","ts-node":"^8.10.2","typescript":"^3.9.7"},"main":"./dist/node-find-files.js","types":"./dist/node-find-files.d.ts","repository":{"type":"git","url":"git://github.com/sudsy/node-find-files.git"},"gitHead":"c8d96f00566700f2cc3a2b1b9d2bfce09a4e9e55","directories":{"example":"examples","test":"jest"},"scripts":{"test":"jest","build":"tsc -d"},"license":"BSD","bugs":{"url":"https://github.com/sudsy/node-find-files/issues"},"_id":"node-find-files@1.0.0","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"shasum":"33780ac4f122db69f0e22a9aa9fe8112df23bb44","size":3823,"noattachment":false,"key":"/node-find-files/-/node-find-files-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-find-files/download/node-find-files-1.0.0.tgz"},"maintainers":[{"name":"sudsy","email":"ben@rebas.com.au"}],"_npmUser":{"name":"sudsy","email":"ben@rebas.com.au"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-find-files_1.0.0_1595733823604_0.1969445785127948"},"_hasShrinkwrap":false,"publish_time":1595733823705,"_cnpm_publish_time":1595733823705},"0.0.4":{"name":"node-find-files","version":"0.0.4","description":"A Node Module for finding files by attributes. Originally developed to find files modified since a particular date.","homepage":"https://github.com/sudsy/node-find-files","keywords":["find","files","recursive","mtime","last modified","nodejs","js"],"author":{"name":"Ben Sudbury","email":"bsudbury@gmail.com"},"dependencies":{"async":"0.2.6"},"devDependencies":{"mocha":"1.8.1","mocks":"0.0.1","should":"1.2.2"},"main":"./lib/node-find-files","repository":{"type":"git","url":"git://github.com/sudsy/node-find-files.git"},"gitHead":"c8d96f00566700f2cc3a2b1b9d2bfce09a4e9e55","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha"},"license":"BSD","bugs":{"url":"https://github.com/sudsy/node-find-files/issues"},"_id":"node-find-files@0.0.4","dist":{"shasum":"e4b62c7f83a992627260d56f072115c618a87059","size":14656,"noattachment":false,"key":"/node-find-files/-/node-find-files-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-find-files/download/node-find-files-0.0.4.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"sudsy","email":"ben@rebas.com.au"},"maintainers":[{"name":"sudsy","email":"ben@rebas.com.au"}],"publish_time":1426805765311,"_cnpm_publish_time":1426805765311,"_hasShrinkwrap":false},"0.0.3":{"name":"node-find-files","version":"0.0.3","description":"A Node Module for finding files by attributes. Originally developed to find files modified since a particular date.","homepage":"https://github.com/sudsy/node-find-files","keywords":["find","files","recursive","mtime","last modified","nodejs","js"],"author":{"name":"Ben Sudbury","email":"bsudbury@gmail.com"},"dependencies":{"async":"0.2.6"},"devDependencies":{"mocha":"1.8.1","mocks":"0.0.1","should":"1.2.2"},"main":"./lib/node-find-files","repository":{"type":"git","url":"git://github.com/sudsy/node-find-files.git"},"gitHead":"c8d96f00566700f2cc3a2b1b9d2bfce09a4e9e55","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha"},"license":"BSD","bugs":{"url":"https://github.com/sudsy/node-find-files/issues"},"_id":"node-find-files@0.0.3","dist":{"shasum":"43352a0c5167610e73b9a89390080901ebd83087","size":13249,"noattachment":false,"key":"/node-find-files/-/node-find-files-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-find-files/download/node-find-files-0.0.3.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"sudsy","email":"ben@rebas.com.au"},"maintainers":[{"name":"sudsy","email":"ben@rebas.com.au"}],"publish_time":1426728063485,"_cnpm_publish_time":1426728063485,"_hasShrinkwrap":false},"0.0.2":{"name":"node-find-files","version":"0.0.2","description":"A Node Module for finding files by attributes. Originally developed to find files modified since a particular date.","homepage":"","keywords":["find","files","recursive","mtime","last modified","nodejs","js"],"author":{"name":"Ben Sudbury","email":"bsudbury@gmail.com"},"dependencies":{"async":"0.2.6"},"devDependencies":{"mocha":"1.8.1","mocks":"0.0.1","should":"1.2.2"},"main":"./lib/node-find-files","repository":{"type":"git","url":"git://github.com/sudsy/node-find-files.git"},"readmeFilename":"README.md","gitHead":"c8d96f00566700f2cc3a2b1b9d2bfce09a4e9e55","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha"},"license":"BSD","_id":"node-find-files@0.0.2","dist":{"shasum":"fe74a4da5478a92b08f3b741a2486b28b7923557","size":14824,"noattachment":false,"key":"/node-find-files/-/node-find-files-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-find-files/download/node-find-files-0.0.2.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"sudsy","email":"bsudbury@gmail.com"},"maintainers":[{"name":"sudsy","email":"ben@rebas.com.au"}],"publish_time":1364270908965,"_cnpm_publish_time":1364270908965,"_hasShrinkwrap":false},"0.0.1":{"name":"node-find-files","version":"0.0.1","description":"A Node Module for finding files by attributes. Originally developed to find files modified since a particular date.","homepage":"","keywords":["find","files","recursive","mtime","last modified","nodejs","js"],"author":{"name":"Ben Sudbury","email":"bsudbury@gmail.com"},"dependencies":{"async":"0.2.6"},"devDependencies":{"mocha":"1.8.1","mocks":"0.0.1","should":"1.2.2"},"main":"./lib/node-find-files","repository":{"type":"git","url":"git://github.com/sudsy/node-find-files.git"},"readmeFilename":"README.md","gitHead":"c8d96f00566700f2cc3a2b1b9d2bfce09a4e9e55","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha"},"license":"BSD","_id":"node-find-files@0.0.1","dist":{"shasum":"5109ef7b75f597255ba009cc0d8af45c19efe587","size":20657,"noattachment":false,"key":"/node-find-files/-/node-find-files-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-find-files/download/node-find-files-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"sudsy","email":"bsudbury@gmail.com"},"maintainers":[{"name":"sudsy","email":"ben@rebas.com.au"}],"publish_time":1364270286351,"_cnpm_publish_time":1364270286351,"_hasShrinkwrap":false}},"readme":"# node-find-files\n\nThis is a quick utility I wrote for recursively searching a directory structure and finding files and directories that match a particular spec.\n\n## What's Different About it\n\nSimilar projects that I was able to find processed the whole directory tree and then handed a set of results back at the end. This module inherits from EventEmitter so it will begin streaming results as soon as the first one is found.\n\nMy initial use case was to find files modified since a particular date, but you can also pass a filter function to return files that match any criteria you can find on the fs.stat object in node.\n\nUsage:\n\n    var FindFiles = require(\"node-find-files\").default;\n\n\n    var d = new Date()\n    d.setDate(d.getDate() - 1);\n\n    var finder = new FindFiles({\n        rootFolder : \"/Users\",\n        fileModifiedDate : d\n    });\n\n    finder.on(\"match\", function(strPath, stat) {\n        console.log(strPath + \" - \" + stat.mtime);\n    })\n    finder.on(\"complete\", function() {\n        console.log(\"Finished\")\n    })\n    finder.on(\"patherror\", function(err, strPath) {\n        console.log(\"Error for Path \" + strPath + \" \" + err)  // Note that an error in accessing a particular file does not stop the whole show\n    })\n    finder.on(\"error\", function(err) {\n        console.log(\"Global Error \" + err);\n    })\n    finder.startSearch();\n\n## OK but give me more Power\n\nYou can set up the finder object with any filter function you like\n\n    //  Alternate Usage to achieve the same goal, but you can use any of the properties of the fs.stat object or the path to do your filtering\n    var finder = new FindFiles({\n        rootFolder : \"/Users\",\n        filterFunction : function (path, stat) {\n            return (stat.mtime > d) ? true : false;\n        }\n    });\n\n## What's new in version 1.0.0?\n\nMain breaking change is that there was previously an export called finder that could be imported as \n\n`import {finder} from \"node-find-files\";`.\n\nThis has been removed now due to an update in tooling so some examples of importing it properly are: \n\n`import finder from \"node-find-files\";` or;\n\n`const finder = require(\"node-find-files\");`\n\nOtherwise it is mainly a bug fix release with a few minor refactorings to support the new tooling.\n    ","_attachments":{},"homepage":"https://github.com/sudsy/node-find-files#readme","bugs":{"url":"https://github.com/sudsy/node-find-files/issues"},"license":"BSD"}