MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / initBrowserFilesystem

Function initBrowserFilesystem

project/emscripten/boxedwine-shell.js:390–409  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

388 }
389 }
390 function initBrowserFilesystem(callback) {
391 console.log("Use Storage mode: "+Config.storageMode);
392 FS.mkdir(ROOT);
393 FS.mkdir(Config.d_drive);
394 if (Config.storageMode == STORAGE_INDEXED_DB) {
395 FS.mount(IDBFS, {autoPersist: true}, ROOT);
396 if (Config.persist_d_drive) {
397 FS.mount(IDBFS, {autoPersist: true}, Config.d_drive);
398 }
399 FS.syncfs(true, function (err) {
400 if (err) {
401 console.log('unable to sync folder: ' + ROOT);
402 } else {
403 callback();
404 }
405 });
406 } else {
407 callback();
408 }
409 }
410 function buildBrowserFileSystem() {
411 if(Config.showUploadDownload){
412 document.getElementById('uploadbtn').style.display = "";

Callers 1

initialSetupFunction · 0.85

Calls 3

callbackFunction · 0.85
logMethod · 0.80
mkdirMethod · 0.80

Tested by

no test coverage detected