W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: [FileAPI] FileWriter and read-only files

From: Eric Uhrhane <ericu@google.com>
Date: Mon, 11 Apr 2011 13:22:12 -0700
Message-ID: <BANLkTimA_Fnnnz8gXyaDNgxKFZOqKcgmFg@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: public-webapps@w3.org
On Mon, Apr 11, 2011 at 12:16 PM, Glenn Maynard <glenn@zewt.org> wrote:
> File objects should have a "readOnly" property, indicating whether write
> permission is granted by the user.  Files returned from <input> elements
> should, by default, set it.  Constructing a FileWriter using a File with its
> readOnly property set should throw an exception.

Are you thinking of FileEntry?  File objects are always immutable, and
there's currently no way to get from a File to a FileWriter.

Having an immutable flag on a FileEntry would make sense, but as
there's currently no API to get a FileWriter outside of the FileSystem
[which has no immutable files], there's no rush to put it in--it can
wait for an API expansion that would let you get such a thing.

> Later, it would be good to also have an attribute on <input> to allow
> opening files for write.  For example, <input type=file file=write> to ask
> for write permission (setting readOnly if only read permission was granted,
> eg. with an "open read-only" checkbox), and <input type=file file=create> to
> also ask the browser to show a "Save As" dialog instead of an "Open" dialog.

We discussed this a while back, and people generally preferred
something like FileSaver instead of markup.

Received on Monday, 11 April 2011 20:22:51 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:31 UTC