Re: Polished FileSystem API proposal

Why both createFile, open{Read, Write, Append} and get? Is it to avoid a
signature with dependent types?

Cheers,
 David

On 7/13/13 2:31 AM, Jonas Sicking wrote:
> 
>   Promise<File> createFile(DOMString path, MakeFileOptions options);
>   Promise<Directory> createDirectory(DOMString path);
> 
>   Promise<(File or Directory)> get(DOMString path);
> 
>   Promise<void> move((DOMString or File or Directory) entry,
>                      (DOMString or Directory or DestinationDict) dest);
>   Promise<void> copy((DOMString or File or Directory) entry,
>                      (DOMString or Directory or DestinationDict) dest);
>   Promise<boolean> remove((DOMString or File or Directory) path,
>                        optional DeleteMode recursive = "nonrecursive");
> 
>   Promise<FileHandle> openRead((DOMString or File) file);
>   Promise<FileHandleWritable> openWrite((DOMString or File) file,
>         optional CreateMode createMode = "createifneeded");
>   Promise<FileHandleWritable> openAppend((DOMString or File) file,
>         optional CreateMode createMode = "createifneeded");
> 
>   EventStream<(File or Directory)> enumerate();
>   EventStream<File> enumerateDeep();
> };


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

Received on Saturday, 13 July 2013 12:07:09 UTC