W3C home > Mailing lists > Public > public-device-apis@w3.org > March 2010

Re: New draft of FileWriter API posted

From: Eric Uhrhane <ericu@google.com>
Date: Wed, 17 Mar 2010 09:27:42 -0700
Message-ID: <44b058fe1003170927m73e90737qd475459842db595a@mail.gmail.com>
To: Ilkka Oksanen <Ilkka.Oksanen@nokia.com>
Cc: "public-device-apis@w3.org" <public-device-apis@w3.org>
Actually, you can't even do the cut-one-byte-off trick.  That's by
design; if you don't have read access, all you can do is overwrite the
file.  The user has selected the location for you to write to, and you
don't have the privileges to make any other decisions about overwrite
vs. append.

Length will read as 0, so a seek(-1) will translate to a seek(0).

On Wed, Mar 17, 2010 at 7:26 AM, Ilkka Oksanen <Ilkka.Oksanen@nokia.com> wrote:
> Eric,
>
> Looks like if some script just has write access to a file it can't reliably
> seek to the end of that file in append use case. Seek(-1) gets close but
> chops one byte off. One work-a-round is to use seek(very large number), but
> should there also be a more elegant way?
>
>     -ilkka
>
>
> On 06.03.10 04:01, ext Eric Uhrhane wrote:
>>
>> I've just posted a new draft of the File Writer API [1], based on the
>> version I posted in January [2].  I look forward to your feedback.  In
>> the mean time, I'll get going on a clean draft of the FileSystem API.
>>
>> Thanks,
>>
>>       Eric Uhrhane
>>       ericu@google.com
>>
>> [1] http://dev.w3.org/2009/dap/file-system/file-writer.html
>> [2]
>> http://lists.w3.org/Archives/Public/public-device-apis/2010Jan/0228.html
>>
>>
>
>
>
Received on Wednesday, 17 March 2010 16:28:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:07 GMT