3 ms·
The File object returned by FileSystemFileHandle.getFile() is only readable as long as the underlying file on disk hasn't changed. If the file on disk is modifi
by ridiculous_fish 5y ago
The File object returned by FileSystemFileHandle.getFile() is only readable as long as the underlying file on disk hasn't changed. If the file on disk is modified, the File object becomes unreadable and you'll need to call getFile() again to get a new File object to read the changed data.
This seems very strange. Since when does a File stop being readable when it is modified? What does "modified" mean here anyways? Can anyone shed some light on this?
- thepete2 5y agoThis is speculation, but it could be a consequence of not wanting to lock the entire file. Where a normal application could place locks on segments of a file, a web app perhaps can't do this through this api. Hence you have the choice between aborting on write and possible "garbage files" (i.e. partly overwritten) if you keep reading.