Skip to content

Commit

Permalink
FSA: Update spec links in IDL to point to whatwg/fs
Browse files Browse the repository at this point in the history
These links will soon be invalid, since we're about to remove all
content from WICG/file-system-access that's duplicated with whatwg/fs

Also updates the README to mention both specs

See WICG/file-system-access#392

Change-Id: I90274697a69e1ca45c4626dca5cb7cad0a0c14dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4049000
Commit-Queue: Austin Sullivan <asully@chromium.org>
Reviewed-by: Daseul Lee <dslee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1075237}
  • Loading branch information
a-sully authored and Chromium LUCI CQ committed Nov 23, 2022
1 parent fdead24 commit eb2a417
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 20 deletions.
15 changes: 11 additions & 4 deletions third_party/blink/renderer/modules/file_system_access/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ contains the mojom interfaces for these APIs.

## APIs In this directory

This directory contains the implementation of the
[File System Access API](https://wicg.github.io/file-system-access/).
This directory contains the implementation of the File System Access API. This
API spans two specifications:
* [whatwg/fs](https://fs.spec.whatwg.org/) specifies access to the
[origin private file system](https://fs.spec.whatwg.org/#origin-private-file-system)
and all shared interfaces.
* [WICG/file-system-access](https://wicg.github.io/file-system-access/)
specifies access to the local file system, including the picker APIs and
drag-and-drop.

It consists of the following parts:

Expand All @@ -22,7 +28,8 @@ It consists of the following parts:
promisified API.

* `StorageManager.getDirectory`: An entry point that gives access to the same
sandboxed filesystem as what is available through the old API.
[sandboxed filesystem](https://fs.spec.whatwg.org/#origin-private-file-system)
as what is available through the old API.

* `FileSystemWritableFileStream`: a more modern API with similar functionality to the
old `FileWriter` API. The implementation of this actually does make use of
Expand All @@ -31,5 +38,5 @@ It consists of the following parts:
to the new mojom API as well.

* `showOpenFilePicker`, `showSaveFilePicker` and `showDirectorPicker`: Entry points
on `window`, that let a website pop-up a file or directory picker, prompting the
on `window`, that let a website pop-up a file or directory picker, prompting the
user to select one or more files or directories, to which the website than gets access.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#dictdef-filesystemcreatewritableoptions
// https://fs.spec.whatwg.org/#dictdef-filesystemcreatewritableoptions
dictionary FileSystemCreateWritableOptions {
boolean keepExistingData = false;
[RuntimeEnabled=FileSystemAccessAPIExperimental] boolean autoClose = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#filesystemdirectoryhandle
// https://fs.spec.whatwg.org/#filesystemdirectoryhandle
[
Exposed=(Window,Worker),
SecureContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// found in the LICENSE file.

// Async iterator returned by FileSystemDirectoryHandle.getEntries().
// https://wicg.github.io/file-system-access/#api-filesystemdirectoryhandle-asynciterable
// https://fs.spec.whatwg.org/#api-filesystemdirectoryhandle-asynciterable
// https://www.ecma-international.org/ecma-262/9.0/index.html#sec-asynciterator-interface
[
LegacyNoInterfaceObject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#filesystemfilehandle
// https://fs.spec.whatwg.org/#filesystemfilehandle
[
Exposed=(Window,Worker),
SecureContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#dictdef-filesystemgetdirectoryoptions
// https://fs.spec.whatwg.org/#dictdef-filesystemgetdirectoryoptions
dictionary FileSystemGetDirectoryOptions {
boolean create = false;
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#dictdef-filesystemgetfileoptions
// https://fs.spec.whatwg.org/#dictdef-filesystemgetfileoptions
dictionary FileSystemGetFileOptions {
boolean create = false;
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#enumdef-filesystemhandlekind
// https://fs.spec.whatwg.org/#enumdef-filesystemhandlekind
enum FileSystemHandleKind {
"file",
"directory",
};

// https://wicg.github.io/file-system-access/#filesystemhandle
// https://fs.spec.whatwg.org/#filesystemhandle
[
Exposed=(Window,Worker),
SecureContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// TODO(fivedots): Replace link with one pointing to spec, once it lands.
// https://github.com/whatwg/fs/blob/main/AccessHandle.md

// https://fs.spec.whatwg.org/#dictdef-filesystemreadwriteoptions
dictionary FileSystemReadWriteOptions {
[EnforceRange] unsigned long long at = 0;
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#dictdef-filesystemremoveoptions
// https://fs.spec.whatwg.org/#dictdef-filesystemremoveoptions
dictionary FileSystemRemoveOptions {
boolean recursive = false;
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#filesystemwritablefilestream
// https://fs.spec.whatwg.org/#filesystemwritablefilestream
[
Exposed=(Window,Worker),
SecureContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#sandboxed-filesystem
// https://fs.spec.whatwg.org/#sandboxed-filesystem
[
SecureContext,
RuntimeEnabled=FileSystemAccessOriginPrivate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/file-system-access/#enumdef-writecommandtype
// https://fs.spec.whatwg.org/#enumdef-writecommandtype
enum WriteCommandType {
"truncate",
"seek",
"write",
};

// https://wicg.github.io/file-system-access/#dictdef-writeparams
// https://fs.spec.whatwg.org/#dictdef-writeparams
dictionary WriteParams {
required WriteCommandType type;
unsigned long long? size;
Expand Down

0 comments on commit eb2a417

Please sign in to comment.