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

Function MFSFactory

test/harness/factories/mfs_factory.ts:5–19  ·  view source on GitHub ↗
(cb: (name: string, objs: FileSystem[]) => void)

Source from the content-addressed store, hash-verified

3import InMemoryFileSystem from '../../../src/backend/InMemory';
4
5export default function MFSFactory(cb: (name: string, objs: FileSystem[]) => void) {
6 if (MountableFileSystem.isAvailable()) {
7 MountableFileSystem.Create({
8 '/test': new InMemoryFileSystem(),
9 '/tmp': new InMemoryFileSystem()
10 }, (e, fs?) => {
11 if (e) {
12 throw e;
13 }
14 cb('MountableFileSystem', [fs]);
15 });
16 } else {
17 cb('MountableFileSystem', []);
18 }
19}

Callers

nothing calls this directly

Calls 3

cbFunction · 0.85
isAvailableMethod · 0.65
CreateMethod · 0.65

Tested by

no test coverage detected