-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing PATH and PATH_FS for FS operations #83
Comments
Do you think exposing a _module would be a good solution? |
@ceifa that's what pyodide does ... as a user, I don't feel too confident in using |
Hey, just to expand on this more - my application relies on certain FS operations (like chdir, stat) which would need JavaScript access to the In addition to existing FS code, I think it would be great if all the filesystems are included, like NODEFS, IDBFS and WORKERFS. Tree-shaking should keep the bundle size relatively light if you didn't use any of the filesystems. |
my idea here was to just expose that Emscripten I hope this clarifies my idea around this proposal ... I never wanted a new API, although I'd welcome one within the Lua realm, but it's gotta be consistent from the JS side of affairs (imo). |
I have noticed that, differently from Pyodide and MicroPython for WASM, where some of these utilities are hidden behind a
_module
field, I can't seem to find these commonly available exports from Emscripten in here, so that I need to manually provide aPATH_FS.resolve(path)
functionality and aPATH.dirname(path)
too.On top of that, it'd be lovely to have a
FS.mkdirTree(pathDir)
utility too, but that's something I can eventually workaround as long as previous utilities are available.If there is no interest in exposing more paths related utilities, please let me know so I can think about a better solution (but we know user-land code for foreign FS can easily fail in various circumstances).
Thank you!
The text was updated successfully, but these errors were encountered: