Re: New draft of FileWriter API posted

On Tue, Mar 9, 2010 at 11:53 PM, Michael A. Puls II
<shadow2531@gmail.com> wrote:
> On Tue, 09 Mar 2010 21:51:28 -0500, Eric Uhrhane <ericu@google.com> wrote:
>
>> I've rolled in the feedback so far.  I've left the line endings as an
>> open issue for now.
>
> What about doing like C does for writing files. You have text translated
> mode (the default) and binary mode. Binary mode writes things as-is and
> translated mode converts newlines to the platform format.
>
> With that said, I would think that the mode would be something you set
> before using write() on FileWriter, and not something append() does when
> building the blob.

As the ending translation is only relevant to text, it makes sense to
keep it where the text conversion happens.  You could append a mixture
of text and binary data to a Blob; if you then wanted to translate the
line endings only on the text portion, there would be no way to sort
it out without excessive bookkeeping under the covers.

>> 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
>>>
>>
>
>
> --
> Michael
>
>

Received on Thursday, 11 March 2010 02:30:00 UTC