Back in the days when prefixed APIs were considered awesome, Google Chrome proposed and shipped a sandboxed File System API with types such as FileEntry
and DirectoryEntry
, and ways of enumerating directories and getting at file data, in addition to APIs for creating files and directories and writing to them. Chrome also introduced drag-and-drop support for directories via DataTransferItem
's webkitGetAsEntry()
, using the same Entry
types as the FS API - in effect exposing a d&d operation as a temporary virtual filesystem.
While the sandboxed FS API never caught on (and became a WG Note), other browser vendors have indicated an intention to implement compatible drag-and-drop support including the prefixed entry point. The associated types are only loosely described in earlier drafts of the FS API, and the entry points aren’t covered at all.
I believe it would be beneficial to the web platform to specify this common behavior to help ensure that new implementations are interoperable, guide authoring tests, and help web developers adopt this functionality. I have started writing a spec describing the current behavior in Chrome:
- Repo: https://github.com/inexorabletash/entries-api
- Explainer: https://github.com/inexorabletash/entries-api/blob/gh-pages/EXPLAINER.md
- Spec: http://inexorabletash.github.io/entries-api/
As mentioned in the explainer, it is an explicit non-goal of this effort to preclude innovative work in this area – notably https://github.com/wicg/directory-upload — but to fully specify the existing behavior already shipping in browser(s), “warts and all”. Assuming further implementations appear, moving some or all parts of this specification into [HTML] and/or [FileAPI] may make the most sense once all issues have been resolved.
Is there sufficient interest from other potential implementers to move this work into the WICG?