Closed kenorb closed 1 week ago
Instead of creating files upfront, I'd like to see the ability to create them on a fly (for the performance reasons).
For example when FS.open() is called and the file doesn't exist, give the parent module ability to create it.
Proposed solution (right before returning ErrnoError(44):
+ if (!node && Module && Module["onFileOpen"]) { + node = Module["onFileOpen"](path, this); + } if (!node) { throw new FS.ErrnoError(44); }
Then the caller module can define something like:
onFileOpen: function (path, fs) { var node = this["FS_createDataFile"](fs.cwd(), path, "foo", true, true, true); return node; },
For example, Drupal got over 20k files, why not create only these files which are requested during the run.
v0.0.9 (currently in alpha) Allows you to load single files, or unpack entire zips into the filesystem.
Instead of creating files upfront, I'd like to see the ability to create them on a fly (for the performance reasons).
For example when FS.open() is called and the file doesn't exist, give the parent module ability to create it.
Proposed solution (right before returning ErrnoError(44):
Then the caller module can define something like:
For example, Drupal got over 20k files, why not create only these files which are requested during the run.