1.0.1 • Published 5 years ago

@jsonxr/filesystem v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

js-filesystem

Universal js library for reading/writing files.

https://web.dev/storage-for-the-web/

Node

In node, it uses the fs package to read/write.

Browser

The default behavior of the implementation uses the best option available to the browser. The order of preference is as follows:

  • File and Entries API
  • IndexedDB
  • LocalStorage

Errors

Both IndexedDB and the Cache API both throw a DOMError named QuotaExceededError when you've exceeded the quota available.

Options

Supported

The following web API was chosen to support a generic browser FileSystem.

FeatureFirefoxChromeEdgeSafariIE
IndexedDByesyesyesyesno

Rejected

The following APIs were all considered in choosing a backend to support

Rejected APIsReason
File and Entries APIRequires permission for each request
CacheRequires a request URL
SessionStorageLimited storage
LocalStorageLimited storage
Cookiesreally?
File System Access APIChromium only
WebSQLdeprecated
Application Cachedeprecated