Skip to content

Commit ebc92a0

Browse files
committed
Add reset_filesystem
1 parent 1acb3f4 commit ebc92a0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/api.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,4 +1277,9 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
12771277
let fileInfo = filesInfo.find(f => f[1] === path);
12781278
sqliteFiles.delete(fileInfo[0])
12791279
}
1280+
1281+
Module["reset_filesystem"] = () => {
1282+
FS.root = null;
1283+
FS.staticInit();
1284+
}
12801285
};

src/fs-externs.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
Module.FS = class {
66
constructor() {
77
this.ErrnoError = class {};
8-
this.filesystems = {}
98
}
109
mount() {}
11-
unmount() {}
1210
isRoot() {}
1311
isFile() {}
1412
isDir() {}

0 commit comments

Comments
 (0)