Re: New draft of FileWriter API posted

On Mon, Mar 8, 2010 at 11:17 PM, Kinuko Yasuda <kinuko@google.com> wrote:
> Hi Eric,
> Thanks for posting the draft.  That looks great; I have a few questoins
> (some are minor):
> - Can seek() / truncate() be called while FileWriter is in WRITING state?
>  I'm afraid allowing it may complicate situations.

I agree; I'll rule it out.

> - I assume when a new FileWriter is obtained its parameters are initialized
> to: position==0, length==fileSize (or 0 if the file is not readable)
> and readyState==INIT.  Is that correct?

Yes.  I'll specify that.

> - Can't we simply set state==WRITING when write() is called?  Or maybe the
> spec need to include a behavior for unexpected multiple-write cases?
> In FileReader state==EMPTY seems to mean result==null.  But in FileWriter if
> we keep state==INIT until the first byte has been written to the disk it
> leaves a possibility that write() is called twice while first write() is in
> INIT state.

I think setting state to WRITING when write is called is the simplest solution.

> 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'?

Thanks.  Spot the plagiarism [I mean...dependence on research into
more-established protocols].

> Kinuko
> On Sat, Mar 6, 2010 at 11:01 AM, 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 Tuesday, 9 March 2010 21:18:46 UTC