MCPcopy
hub / github.com/patriksimek/vm2 / loadAsFileOrDirectory

Method loadAsFileOrDirectory

lib/resolver.js:319–325  ·  view source on GitHub ↗
(x, extList)

Source from the content-addressed store, hash-verified

317 }
318
319 loadAsFileOrDirectory(x, extList) {
320 // a. LOAD_AS_FILE(X)
321 const f = this.loadAsFile(x, extList);
322 if (f) return f;
323 // b. LOAD_AS_DIRECTORY(X)
324 return this.loadAsDirectory(x, extList);
325 }
326
327 tryFile(x) {
328 x = this.fs.resolve(x);

Callers 4

resolveFullMethod · 0.95
resolveEsmMatchMethod · 0.95
customResolveMethod · 0.80
customResolveMethod · 0.80

Calls 2

loadAsFileMethod · 0.95
loadAsDirectoryMethod · 0.95

Tested by

no test coverage detected