Re: [File API] File behavior under modification

On 5/23/2012 3:32 PM, Glenn Maynard wrote:
> On Wed, May 23, 2012 at 12:57 PM, Charles Pritchard <chuck@jumis.com 
> <mailto:chuck@jumis.com>> wrote:
>
>     I think that's where the spec writing for this is challenging. I'd
>     lean toward documenting what's really out there instead of
>     mandating snapshot capabilities in the file system.
>
>
> It doesn't mandate snapshot capabilities.  If the file is changed, 
> reading the File doesn't give you the old data; it fails with an 
> error.  That's easy to for the browser to check: compare the mtime of 
> the file (probably both before and after the read, to avoid races).  
> Native applications could fool this if they want to, but this isn't a 
> problem in practice.  Also, implementations are free to use other 
> mechanisms to implement the "snapshot state" concept (eg. file change 
> notification APIs).

OK, I agree with this method. It'll fix both the Mozilla and WebKit 
families in respect to their current behavior. It may already be 
Mozilla's behavior (I'm a bit behind on tracking it).

-Charles

Received on Wednesday, 23 May 2012 23:00:39 UTC