Re: A FileSystem API for the web

On 10/06/2016 07:21 AM, Feross Aboukhadijeh wrote:
> The web really needs a proper filesystem to properly compete with native apps. I'd love to make WebTorrent (https://webtorrent.io) use the disk
> instead of in-memory storage, but there's no clear cross-browser solution. So, in the meantime, torrent data is stored in memory and lost when the
> user navigates to another page.

Why don't you store the data in IndexedDB? It can store blobs.

>
> Is there an active effort to make this happen? These are the specs I'm currently aware of:
>
> 1. File API (https://w3c.github.io/FileAPI/): widely implemented, 92% support
> 2. File API (Directories and System) (https://www.w3.org/TR/file-system-api/): Chrome only, deprecated, 51% support
Yeah, that is proprietary API, but a subset of it https://wicg.github.io/entries-api/ is implemented elsewhere.
Firefox 50 should have Entries API, and I think Edge has it too.
(Note, because of historical reasons the API uses webkit-prefixes in many places even though webkit, or at least Safari doesn't implement it currently)

> 3. FileSystem API (http://w3c.github.io/filesystem-api/): Meant to replace previous deprecated effort, Browser support unclear, spec status unclear to me
and there is a variant of that too https://wicg.github.io/directory-upload/proposal.html

But atm it is https://wicg.github.io/entries-api/ which is being implemented and we're trying to figure out how to improve that API, since it is quite 
horrible. And if it can't be improved easily, we may need to go back to http://w3c.github.io/filesystem-api/ approach.



>
> Spec #1 is quite good, but it doesn't spec an entire filesystem. Spec #2 would have been sufficient for our use case, but is deprecated. Spec #3 seems
> like the best hope. Is that being worked on?
>
> Feross
> Blog <http://feross.org/> |WebTorrent <https://webtorrent.io/>|Study Notes <https://www.apstudynotes.org/>

Received on Thursday, 6 October 2016 09:11:24 UTC