MCPcopy
hub / github.com/jvilk/BrowserFS / Create

Method Create

src/backend/HTML5FS.ts:177–180  ·  view source on GitHub ↗

* Creates an HTML5FS instance with the given options.

(opts: HTML5FSOptions, cb: BFSCallback<HTML5FS>)

Source from the content-addressed store, hash-verified

175 * Creates an HTML5FS instance with the given options.
176 */
177 public static Create(opts: HTML5FSOptions, cb: BFSCallback<HTML5FS>): void {
178 const fs = new HTML5FS(opts.size, opts.type, false);
179 fs.allocate((e) => e ? cb(e) : cb(null, fs), false);
180 }
181 public static isAvailable(): boolean {
182 return !!_getFS;
183 }

Callers

nothing calls this directly

Calls 2

allocateMethod · 0.95
cbFunction · 0.85

Tested by

no test coverage detected