jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.06k stars 215 forks source link

Support fs.open on directories #244

Closed mxrth closed 1 year ago

mxrth commented 6 years ago

On node on linux fs.openSync('/tmp', 'r') works fine, whereas BrowserFS only allows open on files. This would, among other things, allow fstatting on directories. (My concrete use case is to use BrowserFS to run go binaries in the browser via the upcoming wasm-backend. The go standard lib does an open, fstat, readdir sequence whenever it gets an directory listing)

wapacz commented 2 years ago

I'm trying to use BrowserFS with wasm (golang based, using 1.16 version) and facing this issue when trying to list files with Golang. It tries to open directory to list files. I was trying to apply misak113 changes but without success, facing another error. Are there any plans regarding this?