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

Re: New draft of FileWriter API posted

From: Kinuko Yasuda <kinuko@chromium.org>
Date: Tue, 9 Mar 2010 13:11:36 -0800
Message-ID: <f6ddb9231003091311y8c0ecc4o1a58d08949734d0c@mail.gmail.com>
To: Eric Uhrhane <ericu@google.com>
Cc: public-device-apis@w3.org
Hi Eric,
Thanks for posting the draft.  This looks great; I have a few questoins
mostly around readyState transition:

- Can seek() / truncate() be called while FileWriter is in WRITING state?

- I assume when a new FileWriter is obtained its parameters are initialized
position==0, length==fileSize (or 0 if the file is not readable)
and readyState==INIT.  Is that correct?  Therefore if a user does not have a
read (attribute) access to the file, the user cannot append data to the file
but can only overwrite.

- What happens if write() is called twice while first write() is in INIT
Can't we simply say readyState becomes WRITING when write() is called?
If write() can be called repeatedly even after state becomes DONE (I assume
it can from our offline discussion), resetting state to INIT on every
write() may make definition of INIT a bit ambiguous.  (In FileReader
state==EMPTY seems to mean result=null.)

Some nits:
4.4 The FileWriter Task Source, line 1: reads -> writes?
6.3 Error Code Descriptions, SECURITY_ERR: 'too many read calls' -> 'too
many write calls'?


On Fri, Mar 5, 2010 at 6:01 PM, Eric Uhrhane <ericu@google.com> 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, 10 March 2010 09:23:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:42 UTC