MCPcopy
hub / github.com/walterhiggins/ScriptCraft / find

Function find

src/docs/js/generateApiDocs.js:13–25  ·  view source on GitHub ↗
(dir, store, re)

Source from the content-addressed store, hash-verified

11 find - a (very) basic implementation of the unix command line tool.
12 */
13function find(dir, store, re) {
14 var files = dir.listFiles();
15 foreach(files, function(filename) {
16 filename = '' + filename;
17 var file = new File(filename);
18 if (file.isDirectory()) {
19 find(file, store, re);
20 } else {
21 if (typeof re == 'undefined') store.push(filename);
22 else if (filename.match(re)) store.push(filename);
23 }
24 });
25}
26/*
27 the main module file for a given directory
28 (assuming the main module is in a file with the same name as the parent

Callers 3

_autoloadFunction · 0.85
_requireFunction · 0.85
generateApiDocs.jsFile · 0.85

Calls 1

foreachFunction · 0.85

Tested by

no test coverage detected