MCPcopy Create free account
hub / github.com/ceifa/wasmoon / doFile

Method doFile

src/engine.ts:73–75  ·  view source on GitHub ↗

* Executes Lua code from a file asynchronously. * @param filename - Path to the Lua script file. * @returns - A Promise that resolves to the result returned by the Lua script execution.

(filename: string)

Source from the content-addressed store, hash-verified

71 * @returns - A Promise that resolves to the result returned by the Lua script execution.
72 */
73 public doFile(filename: string): Promise<any> {
74 return this.callByteCode((thread) => thread.loadFile(filename))
75 }
76
77 /**
78 * Executes Lua code from a string synchronously.

Callers 1

filesystem.test.jsFile · 0.80

Calls 2

callByteCodeMethod · 0.95
loadFileMethod · 0.80

Tested by

no test coverage detected