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.07k stars 218 forks source link

Move away from a filesystem singleton #105

Closed jvilk closed 8 years ago

jvilk commented 9 years ago

Projects like JSMESS want to be able to have multiple filesystems on the same webpage. This can cause issues if they try to have multiple localStorage file systems at once, but it can be very convenient for encapsulation purposes when dealing primarily with zip file / in-memory file systems.

jvilk commented 9 years ago

I think a good way to do this is to default to the same behavior we have now (e.g. start with a single fs object), but have a separate function exposed via the BrowserFS global to construct additional fs modules if desired.

jvilk commented 8 years ago

Done.