Repository navigation
Conversation
|
|
||
| ## Names and paths ## {#names-paths} | ||
|
|
||
| A <dfn export>name</dfn> is a string which: |
There was a problem hiding this comment.
Maybe... just exporting "name" is too generic:
| A <dfn export>name</dfn> is a string which: | |
| A <dfn export local-lt="name">file name</dfn> is a [=string=] which: |
There was a problem hiding this comment.
file name would be semantically wrong, I think. This can be a directory name, a file system's name, or any entry name.
This is also related to WICG/entries-api#37
In the spirit of getting this merged first and fixing the existing issues later, I see two options for resolving this:
- Un-export it.
- Name it something more generic for now —
how about entry name? It makes it less likely to be confused forEdit: there's already anFile.name.entry/nametoo, dang. Too many names!
cc @annevk
|
|
||
| ## Files and directories ## {#files-dirs} | ||
|
|
||
| A <dfn export id=file-concept>file</dfn> consists of binary data and a <dfn |
There was a problem hiding this comment.
How come this one needs an id and the others don't?
There was a problem hiding this comment.
#dfn-file is already taken by the {{File}} interface (via the legacy Translate Ids mapping), so without an explicit id it collides.
Also related to WICG/entries-api#37
| optional FilePropertyBag options = {}); | ||
| readonly attribute DOMString name; | ||
| readonly attribute long long lastModified; | ||
| readonly attribute USVString webkitRelativePath; |
There was a problem hiding this comment.
Argh… do we really want to standardize this here? Should we send this to the WHATWG Compat spec instead?
There was a problem hiding this comment.
@marcoscaceres That's fine by me. I was told merging as-is was higher priority than unprefixing and solving existing issues but I can start doing that now.
So this would need to be replaced with an unprefixed relativePath for the purpose of this spec, right? And to get commitment from browsers + have the old prefixed version in Compat.
There was a problem hiding this comment.
I think @jcayzac did the right thing.
The Compat specification is meant to be temporary. Prefixed features that end up widely deployed should just be standardized in the relevant specification, not separately.
We also don't want to introduce new features while making a big move like this.
There was a problem hiding this comment.
Ah, sorry, I had this backwards then. I thought it was the other way around.
There was a problem hiding this comment.
@annevk @marcoscaceres Thank you. However I think I'm still unclear on what should be the exact course of action.
"Prefixed features that end up widely deployed should just be standardized in the relevant specification" suggests I should unprefix it already since it's implemented everywhere? Or you meant standardize the prefixed version? The last sentence reads like you'd rather not unprefix now.
Sorry progress on this has been delayed a bit due to summer vacations.
There was a problem hiding this comment.
Correct, we should standardize it including prefix as that is what is implemented everywhere. At a future point we can consider standardizing a separate unprefixed version. (In prior discussions that also came with some potential API refinements so it really needs to be separate from this effort.)
| are to return [=/this=]'s [=relative path=], or the empty string if not specified. | ||
|
|
||
| Note: A {{File}}'s [=relative path=] is set when the {{File}} is selected as part of a | ||
| directory; see the <{input/webkitdirectory}> attribute [[HTML]]. |
There was a problem hiding this comment.
@marcoscaceres @annevk until the attribute gets merged into the WHATWG spec, this is a link error. Is it OK to unlink it for now?
| directory; see the <{input/webkitdirectory}> attribute [[HTML]]. | |
| directory; see the <code>webkitdirectory</code> attribute of the <{input}> element [[HTML]]. |
Incorporates the File-API-bound content from the WICG Entries API (https://wicg.github.io/entries-api/) into this specification: - Path and entry concepts (names, paths, files, directories, entries) and the resolve/evaluate-a-path algorithms, added to the Terminology and Algorithms section. - File.webkitRelativePath, folded into the complete File IDL. - New "Files and Directories" section with complete IDL for FileSystemEntry, FileSystemDirectoryEntry, FileSystemDirectoryReader, FileSystemFileEntry, and FileSystem, along with all associated callbacks, dictionaries, algorithms, and examples. HTML-bound content (HTMLInputElement.webkitdirectory/webkitEntries and DataTransferItem.webkitGetAsEntry()) is out of scope and remains to be merged into the HTML standard.
0c6f4a2 to
338b863
Compare
AI feedbackReviewed at cb152dc. I pushed 3fe0427 with fixes for problems the port introduced:
With it, Bikeshed (via the W3C spec generator) reports no warnings beyond those already on main. I filed the problems that predate the port separately, so they don't hold up the move: #237 (relative path of a Suggestions
|
Incorporates the File-API-bound content from the WICG Entries API (https://wicg.github.io/entries-api/) into this specification:
File.webkitRelativePathwas merged into theFileIDL.FileSystemEntry,FileSystemDirectoryEntry,FileSystemDirectoryReader,FileSystemFileEntryandFileSystem, along with all associated callbacks, dictionaries, algorithms, and examples.HTMLInputElement.webkitdirectory/webkitEntriesandDataTransferItem.webkitGetAsEntry()) remains to be added to the HTML standard. See Merge "File and Directory Entries API" into HTML whatwg/html#217 (comment)Implementation commitments are "not applicable" for now since this reflects the current state of implementations.
@marcoscaceres @mkruisselbrink is this directionally correct / what you had in mind?
Preview | Diff