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

Function LSFSFactory

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

Source from the content-addressed store, hash-verified

2import {FileSystem} from '../../../src/core/file_system';
3
4export default function LSFSFactory(cb: (name: string, objs: FileSystem[]) => void) {
5 if (LocalStorageFileSystem.isAvailable()) {
6 var backend = new LocalStorageFileSystem();
7 backend.empty();
8 cb('localStorage', [backend]);
9 } else {
10 cb('localStorage', []);
11 }
12}

Callers

nothing calls this directly

Calls 3

cbFunction · 0.85
isAvailableMethod · 0.65
emptyMethod · 0.45

Tested by

no test coverage detected