W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Request for feedback: Filesystem API

From: Jonas Sicking <jonas@sicking.cc>
Date: Sat, 10 Aug 2013 00:52:02 -0700
Message-ID: <CA+c2ei_fcEs0Kr04DxDW-+isvUeya7Kdrudt=EeEfwiFJTnZeA@mail.gmail.com>
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Fri, Aug 9, 2013 at 11:24 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> On Fri, Aug 9, 2013 at 7:25 PM, Domenic Denicola
> <domenic@domenicdenicola.com> wrote:
>> - At a glance, move, copy, removeDeep, and enumerateDeep seem like derivative APIs.

Actually, another piece of syntax sugar that you did not comment on,
but that I listed in the "open questions" section is the Directory

One way to simplify the API is to remove the Directory abstraction and
instead let all the interactions happen through some object
representing the root.

Another way that I forgot to mention is that the "(DOMString or
Directory or DestinationDict)" unions for "dest" argument in move()
and copy() is a bit excessive. It lets you do any of

dir.move(file, "newname.txt");
dir.move(file, destDir);
dir.move(file, { name: "newname.txt", dir: destDir);

But we could arguably simplify that and only allow the dictionary syntax. I.e.

dir.move(file, { name: "newname.txt" });
dir.move(file, { dir: destDir });
dir.move(file, { name: "newname.txt", dir: destDir });

/ Jonas
Received on Saturday, 10 August 2013 07:52:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:17 UTC