-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Migrated from WICG/file-system-access#121 and WICG/file-system-access#244 (see #2)
@foolip:
https://fs.spec.whatwg.org/#api-filesystemfilehandle-getfile says in domintro:
If the file on disk changes or is removed after this method is called, the returned File object will likely be no longer readable.
This isn't the normative text, but when the normative algorithm is written down will there really be any uncertainty to justify "likely" or can it be defined exactly what happens and when.
For a File that is no longer readable, does that mean that it's somehow neutered? Would lastModified reflect the change/removal time, or how would one tell that a File object is in this state?
@mkruisselbrink:
The note there is mostly trying to describe what is already (not well) defined in FileAPI. I.e. this is the behavior for all File objects that represent actual files on disk. Unfortunately this is also not very well specified in FileAPI (see for example w3c/FileAPI#47, but also w3c/FileAPI#75). I definitely intend to fix that, but will need to fix the FileAPI side of things before I can fix this side.
@mkruisselbrink:
We should define behavior of FileSystemFileHandle.getFile() when the underlying file no longer exists. Currently the spec is pretty much silent on this, we should probably make it clear/explicit that this should reject with a NotFoundError.