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

CacheStorage backend #202

Closed billiegoose closed 1 year ago

billiegoose commented 6 years ago

This adds a new backend based on the Cache Storage API, which is like the Indexed DB API in that it is an async only API accessible to both window code and worker code. But it is a much more natural fit for a binary key value store than IDB with its sorted indexes and painful event model ever was, so I am anticipating (perhaps incorrectly) that this backend will have much faster write speeds than the IDB backend.

Tests are failing almost immediately. I don't know why - I was able to do mkdir, readdir, writeFile, readFile using the "dist" build in Chrome. I'm going to try using the dist build with isomorphic-git and see if that underlying anything.

billiegoose commented 6 years ago

@jvilk As of 7566124 the CacheStorage backend works for me in test pages. If you have time, can you look at the tests for CacheStorage and see why the test fixtures aren't loading?

Firefox 55.0.0 (Linux 0.0.0) BrowserFS Tests FS Tests CacheStorageFS CacheStorage - test-0.8388968285422127 Load fixtures FAILED
    uncaught exception: Error: ENOENT: No such file or directory., '/test/fixtures/files/node/a.js' (:0)
Firefox 55.0.0 (Linux 0.0.0): Executed 69 of 705 (1 FAILED) (0 secs / NaN secs)
aleGuardiola commented 5 years ago

Hello, is anyone looking at this. Why the tests are failing?? and if there is plans to still support this backend?

emeryberger commented 1 year ago

Been a long time, catching up on these things. We'll have to deal with the CI issues, but I'm happy to merge the PR once the conflicts are resolved. Thanks.