aboutsummaryrefslogtreecommitdiff
path: root/modules/core/virtual-fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/virtual-fs.js')
-rw-r--r--modules/core/virtual-fs.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/core/virtual-fs.js b/modules/core/virtual-fs.js
index cb8020a..f6e2826 100644
--- a/modules/core/virtual-fs.js
+++ b/modules/core/virtual-fs.js
@@ -545,6 +545,13 @@ class VirtualFileSystem {
mkdir(path) { return this.mkdirRecursive(path); }
list(path) { return this.ls(path); }
dir(path) { return this.ls(path); }
+ reset() {
+ this.root = { type: 'dir', content: {} };
+ this.currentPath = [];
+ // Wipe all localStorage keys
+ ['webx11_filesystem', 'webx11_filesystem_v2'].forEach(k => localStorage.removeItem(k));
+ return true;
+ }
}
// Also expose for module system