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

Function fetchIso

test/harness/factories/isofs_factory.ts:22–39  ·  view source on GitHub ↗
(isoFilename: string)

Source from the content-addressed store, hash-verified

20 let rv: FileSystem[] = [];
21 let countdown = isoFiles.length;
22 function fetchIso(isoFilename: string): void {
23 fs.readFile(isoFilename, (e, data?) => {
24 if (e) throw e;
25 IsoFS.Create({
26 data: data,
27 name: isoFilename
28 }, (e, fs?) => {
29 if (e) {
30 throw e;
31 }
32 rv.push(fs);
33 countdown--;
34 if (countdown === 0) {
35 cb('IsoFS', rv);
36 }
37 });
38 });
39 }
40 for (let i = 0; i < isoFiles.length; i++) {
41 fetchIso(`${isodir}/${isoFiles[i]}`);
42 }

Callers 1

IsoFSFactoryFunction · 0.85

Calls 3

cbFunction · 0.85
readFileMethod · 0.65
CreateMethod · 0.65

Tested by

no test coverage detected