MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / locateFile

Function locateFile

packages/ui-default/backendlib/template.ts:39–45  ·  view source on GitHub ↗
(basePath: string, filenames: string[])

Source from the content-addressed store, hash-verified

37}
38
39function locateFile(basePath: string, filenames: string[]) {
40 for (const i of filenames) {
41 const p = path.resolve(basePath, i);
42 if (fs.existsSync(p)) return p;
43 }
44 return null;
45}
46
47// @ts-ignore
48nunjucks.runtime.memberLookup = function memberLookup(obj, val) {

Callers 1

[Service.init]Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected