cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Clelland <>
Subject Re: CB-5974, or, Re-thinking broken-by-default (Was: Re: Plugins Release!)
Date Wed, 05 Feb 2014 15:02:54 GMT
On Tue, Feb 4, 2014 at 11:45 PM, Josh Soref <> wrote:

> Is it impossible to have reads merged from both locations, but writes go
> to the new location, and when a write completes in the new location, delete
> the old one?

It might be. The File API doesn't impose any sort of model for read/write
patterns. Reads and writes can happen anywhere in a file; we can't enforce
that a file is written out entirely in one call, so there may not be a
point where we can say "it's done; delete the old one".

It's also entirely possible for multiple readers to be open on the file,
and for another thread to have a writer open, writing somewhere in the
middle of the file, so I would expect race conditions.

This isn't *impossible*; there have been OS filesystems which do this for a
long time, but it seems to me to be a lot more work than writing a tool for
developers to use for migration, and much more error prone.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message