Closed domenic closed 7 years ago
Aside: rename DOMFileSystem to something less grotesque at the same time? I dunno..
... and then drop [NoInterfaceObject]
on the types, per inline issue
I'm really hoping to avoid Edge's webkitFileEntry
and friends getting baked into the platform, but is there a chance Edge and Gecko will follow suit if Chrome makes this change?
@aliams @smaug---- ?
FileSystemEntry perhaps? and then drop NoInterfaceObject
I think it's low enough risk to change the names of these interfaces in Edge since they are NoInterfaceObjects in Chrome and Firefox and hence never actually referenced by a web developer in their code.
How do you feel about prefixing these interfaces with something like FileSystem
:
FileSystem
FileSystemEntry
FileSystemFileEntry
FileSystemDirectoryEntry
Alternatively, we can prefix with FS
so the interface names aren't as lengthy.
On the other hand, would you prefer that we only change Entry
to avoid it's ambiguity as per the blink-dev thread?
FileSystem prefix with them all sounds good.
HTTPArchive (2016-08-01) turns up:
FileSystemEntry
FileSystemFileEntry
FileSystemDirectoryEntry
.. so I think we're good there!
FileSystem
itself has a couple hits as window.FileSystem
and var FileSystem
(searching for "FileSystem" on its own gets hundreds of hits, since it's such a generic phrase, so I'm ignoring that)
var FileSystem = ...
-this would overwrite the new global and keep working."undefined"!=typeof window.FileSystem
as part of a long browser detection scheme (looking for Samsung SmartHub devices); the first part of the test does a string test for a proprietary OS and later look for specific firmware.Should we ahead with trying DOMFileSystem
→ FileSystem
or just keep that one? (there were 0 hits for window.DOMFileSystem
and var DOMFileSystem
). Other phrases I should search on?
Not having DOM
-prefixes would be nice. I like @aliams' list.
@inexorabletash so which naming will blink use? Especially FileSystem or DOMFileSystem?
@bakulf ^
@smaug---- see https://groups.google.com/a/chromium.org/d/msg/blink-dev/xTfeHGlcIQg/X0Q4iDJHAgAJ. The intent specifies FileSystem, but it's not yet approved or tried.
We should rename DirectoryReader to FileSystemDirectoryReader as well.
I suggest to rename these callbacks too:
BlobCallback -> FileSystemBlobCallback EntriesCallback -> FileSystemEntriesCallback EntryCallback -> FileSystemEntryCallback ErrorCallback -> FileSystemErrorCallback VoidCallback -> FileSystemVoidCallback
Yeah, I think those changes make sense and keep the API more consistent. And the tiny bit long names don't really matter in practice.
Is BlobCallback not in HTML already?
(Callback names are not exposed by the way so their names matter much less, if at all.)
FileCallback is part of HTMLCanvasElement. BlobCallback doesn't exist yet. Probably it's OK to keep BlobCallback, ErrorCallback and VoidCallback. But EntriesCallback and EntryCallback should follow the new names.
Change was approved for Blink. I'm travelling so it'll be a couple days before I can make the change and update the spec.
I agree with @bakulf's last comment, and will rename the FileSystemEntry/Entries callbacks as well for spec consistency in case plain "Entry" does make it into another spec in the future.
I don't suppose anyone wants to review https://github.com/WICG/entries-api/pull/8 ?
@bakulf could you check if ^ matches your patch, in other words review the change here.
Note that it may take some time for Blink to make the change since there are lots of internal dependencies c/o the use of the same types for the Chrome-only FileSystem API. Worst case we can "fork" our impl for the Directory Upload use case vs. File System case. But that's an impl issue, so resolving here.
@smaug---- , yes this is what we have in gecko.
E.g. FileOrDirectoryEntry. See blink-dev concerns about the name in global scope