W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Re: Moving File API: Directories and System API to Note track?

From: Maciej Stachowiak <mjs@apple.com>
Date: Sat, 22 Sep 2012 18:06:08 -0700
Cc: Eric U <ericu@google.com>, olli@pettay.fi, public-webapps@w3.org
Message-id: <47E1E09E-B653-4EFD-BFA4-BE5CB6476647@apple.com>
To: Jonas Sicking <jonas@sicking.cc>

On Sep 21, 2012, at 10:10 PM, Jonas Sicking <jonas@sicking.cc> wrote:

> For what it's worth, I put together a draft for what an API would look
> like that has basically the same feature set as the current FileSystem
> API, but based on DeviceStorage. It's a much smaller API that the
> current FileSystem drafts, but supports things like shallow as well as
> deep directory iteration.
> https://wiki.mozilla.org/WebAPI/DeviceStorageAPI2
> I think that if we at mozilla were to implement a sandboxed
> filesystem, it'd be something more like this.

I took a crack at a pruned and cleaned up version:


Only 4 interfaces (excluding the Navigator addition), 16 methods, 9 attributes. And two of the interfaces are generic and reusable in other contexts.

It removes cruft but adds features relative to the Mozilla version:

- Atomic create/open operation
- Renaming files and directories
- A Directory interface for less weirdness in directory handling
- Ability to open files in append mode (this makes more sense than an append() operation on the handle, given the way underlying filesystems work)

Features omitted include:
 - Multiple named filesystems (just use directories)
- Separate enumeration for writing (just use open)
- Ability to fetch matadata (does not appear to be needed for the use case)

It could be simplified a little bit, but really not that much, by removing hierarchy.

Received on Sunday, 23 September 2012 01:06:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:38 UTC