WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 7ebdd0f

Browse files
committed
Support "write" access mode
Motivation and details are in #175
1 parent 1ffcc32 commit 7ebdd0f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

index.bs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ A <dfn export id="entry">file system entry</dfn> is either a [=file entry=] or a
6565

6666
Each [=/file system entry=] has an associated
6767
<dfn for="file system entry" id=entry-query-access>query access</dfn>
68-
algorithm, which takes "`read`" or "`readwrite`" <var ignore>mode</var> and
68+
algorithm, which takes "`read`", "`readwrite`", or "`write`" <var ignore>mode</var> and
6969
returns a [=/file system access result=].
7070
Unless specified otherwise it returns a [=/file system access result=] with a
7171
[=file system access result/permission state=] of "{{PermissionState/denied}}"
7272
and with an [=file system access result/error name=] of the empty string.
7373

7474
Each [=/file system entry=] has an associated
7575
<dfn for="file system entry" id=entry-request-access>request access</dfn>
76-
algorithm, which takes "`read`" or "`readwrite`" <var ignore>mode</var> and
76+
algorithm, which takes "`read`", "`readwrite`", or "`write`" <var ignore>mode</var> and
7777
returns a [=/file system access result=].
7878
Unless specified otherwise it returns a [=/file system access result=] with a
7979
[=file system access result/permission state=] of "{{PermissionState/denied}}"
@@ -565,7 +565,7 @@ The <dfn method for=FileSystemFileHandle>createWritable(|options|)</dfn> method
565565
1. [=Enqueue the following steps=] to the [=file system queue=]:
566566
1. Let |entry| be the result of [=locating an entry=] given |locator|.
567567
1. Let |accessResult| be the result of running |entry|'s
568-
[=file system entry/request access=] given "`readwrite`".
568+
[=file system entry/request access=] given "`write`".
569569
1. If |accessResult|'s [=file system access result/permission state=]
570570
is not "{{PermissionState/granted}}", [=queue a storage task=] with
571571
|global| to [=/reject=] |result| with a {{DOMException}} of
@@ -846,7 +846,7 @@ The <dfn method for=FileSystemDirectoryHandle>getFileHandle(|name|, |options|)</
846846
1. Let |entry| be the result of [=locating an entry=] given |locator|.
847847
1. If |options|["{{FileSystemGetFileOptions/create}}"] is true:
848848
1. Let |accessResult| be the result of running |entry|'s
849-
[=file system entry/request access=] given "`readwrite`".
849+
[=file system entry/request access=] given "`write`".
850850
1. Otherwise:
851851
1. Let |accessResult| be the result of running |entry|'s
852852
[=file system entry/query access=] given "`read`".
@@ -928,7 +928,7 @@ The <dfn method for=FileSystemDirectoryHandle>getDirectoryHandle(|name|, |option
928928
1. Let |entry| be the result of [=locating an entry=] given |locator|.
929929
1. If |options|["{{FileSystemGetDirectoryOptions/create}}"] is true:
930930
1. Let |accessResult| be the result of running |entry|'s
931-
[=file system entry/request access=] given "`readwrite`".
931+
[=file system entry/request access=] given "`write`".
932932
1. Otherwise:
933933
1. Let |accessResult| be the result of running |entry|'s
934934
[=file system entry/query access=] given "`read`".
@@ -1004,7 +1004,7 @@ The <dfn method for=FileSystemDirectoryHandle>removeEntry(|name|, |options|)</df
10041004

10051005
1. Let |entry| be the result of [=locating an entry=] given |locator|.
10061006
1. Let |accessResult| be the result of running |entry|'s
1007-
[=file system entry/request access=] given "`readwrite`".
1007+
[=file system entry/request access=] given "`write`".
10081008

10091009
1. [=Queue a storage task=] with |global| to run these steps:
10101010
1. If |accessResult|'s [=file system access result/permission state=]
@@ -1162,7 +1162,7 @@ given a [=file entry=] |file| in a [=/Realm=] |realm|:
11621162
1. Let |closeResult| be [=a new promise=].
11631163
1. [=Enqueue the following steps=] to the [=file system queue=]:
11641164
1. Let |accessResult| be the result of running |file|'s
1165-
[=file system entry/query access=] given "`readwrite`".
1165+
[=file system entry/query access=] given "`write`".
11661166

11671167
1. [=Queue a storage task=] with |file|'s [=relevant global object=]
11681168
to run these steps:
@@ -1215,7 +1215,7 @@ runs these steps:
12151215
1. [=Enqueue the following steps=] to the [=file system queue=]:
12161216
1. Let |accessResult| be the result of running
12171217
|stream|'s [=FileSystemWritableFileStream/[[file]]=]'s
1218-
[=file system entry/query access=] given "`readwrite`".
1218+
[=file system entry/query access=] given "`write`".
12191219

12201220
1. [=Queue a storage task=] with |stream|'s [=relevant global object=] to
12211221
run these steps:

0 commit comments

Comments
 (0)