MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / recurseDirectory

Method recurseDirectory

tools/mcpack.js:1211–1227  ·  view source on GitHub ↗
(folderPath, filter, callback)

Source from the content-addressed store, hash-verified

1209 }
1210 }
1211 recurseDirectory(folderPath, filter, callback) {
1212 const names = this.enumerateDirectory(folderPath);
1213 for (let name of names) {
1214 const path = folderPath + this.slash + name;
1215 if (this.isDirectoryOrFile(path) < 0) {
1216 this.recurseDirectory(path, filter, callback);
1217 }
1218 else {
1219 if (filter) {
1220 if (filter.call(this, path))
1221 callback.call(this, path);
1222 }
1223 else
1224 callback.call(this, path);
1225 }
1226 }
1227 }
1228 resolvePrefix(value) {
1229 const colon = value.indexOf(":");
1230 if (colon > 0) {

Callers 1

getPlatformBuiltinsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected