Skip to content

Commit 1e892af

Browse files
jlongsternrakochy
authored andcommitted
Add reset_filesystem
1 parent 0a243e0 commit 1e892af

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
@@ -1425,4 +1425,9 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
14251425
let fileInfo = filesInfo.find(f => f[1] === path);
14261426
sqliteFiles.delete(fileInfo[0])
14271427
}
1428+
1429+
Module["reset_filesystem"] = () => {
1430+
FS.root = null;
1431+
FS.staticInit();
1432+
}
14281433
};

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)