[w3c/FileAPI] Entries: Should `directory` be defined as a special type of `file`? (Issue #234)

jcayzac created an issue (w3c/FileAPI#234)

The spec defines `file` and `directory` as sibling concepts. A file has binary data and a name. A directory has a name and an ordered list of members, each a file or a directory.

Should `directory` instead be defined as a special type of `file`, so that minimal changes are necessary in HTML to describe directory selections made with `webkitdirectory` and `DataTransferItem.webkitGetAsEntry()`?

Related:

- [WICG/entries-api#37: File model conflicts with File API](https://github.com/WICG/entries-api/issues/37)
- [WICG/entries-api#21: Should backslashes be forbidden?](https://github.com/WICG/entries-api/issues/21)
- [w3c/FileAPI#161: Specify how filenames from the OS map to File's name property](https://github.com/w3c/FileAPI/issues/161)
- [w3c/FileAPI#41: Remove the / -> : replacement from the File constructor](https://github.com/w3c/FileAPI/issues/41)
- [whatwg/html#217: Merge "File and Directory Entries API" into HTML](https://github.com/whatwg/html/issues/217)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/FileAPI/issues/234
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/FileAPI/issues/234@github.com>

Received on Friday, 20 November 2026 07:23:51 UTC