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

Method mountFile

src/factory.ts:38–40  ·  view source on GitHub ↗

* Mounts a file in the Lua environment asynchronously. * @param path - Path to the file in the Lua environment. * @param content - Content of the file to be mounted. * @returns - A Promise that resolves once the file is mounted.

(path: string, content: string | ArrayBufferView)

Source from the content-addressed store, hash-verified

36 * @returns - A Promise that resolves once the file is mounted.
37 */
38 public async mountFile(path: string, content: string | ArrayBufferView): Promise<void> {
39 this.mountFileSync(await this.getLuaModule(), path, content)
40 }
41
42 /**
43 * Mounts a file in the Lua environment synchronously.

Callers 2

luatests.jsFile · 0.80
filesystem.test.jsFile · 0.80

Calls 2

mountFileSyncMethod · 0.95
getLuaModuleMethod · 0.95

Tested by

no test coverage detected