Skip to content

Commit 9f3c5bf

Browse files
committed
update queueing + say "an" OPFS
1 parent cf6f9e8 commit 9f3c5bf

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

index.bs

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ spec:webidl; type:dfn; text:resolve
1414
</pre>
1515

1616
<pre class=anchors>
17-
urlPrefix: https://html.spec.whatwg.org/; spec: html
18-
type: dfn; text: serializable objects; url: serializable-objects
1917
urlPrefix: https://tc39.es/ecma262/; spec: ECMA-262
2018
type: dfn; text: realm; url: realm
2119
urlPrefix: https://storage.spec.whatwg.org/; spec: storage
@@ -268,7 +266,7 @@ The <dfn attribute for=FileSystemHandle>name</dfn> getter steps are to return [=
268266
The <dfn method for=FileSystemHandle>remove(|options|)</dfn> method steps are:
269267

270268
1. Let |result| be [=a new promise=].
271-
1. [=Queue a task=] on the [=storage task source=] to run these steps:
269+
1. Run these steps [=in parallel=]:
272270
1. Let |access| be the result of running [=this=]'s
273271
[=FileSystemHandle/entry=]'s [=file system entry/request access=] given
274272
"`readwrite`".
@@ -281,32 +279,33 @@ The <dfn method for=FileSystemHandle>remove(|options|)</dfn> method steps are:
281279
1. If |lockResult| is false, [=reject=] |result| with a
282280
"{{NoModificationAllowedError}}" {{DOMException}} and abort.
283281

284-
1. If |entry| does not exist in the underlying file system,
285-
[=/reject=] |result| with a {{NotFoundError}} and abort.
286-
287-
1. If |entry| is a [=directory entry=]:
288-
1. If |entry|'s [=directory entry/children=] [=set/is empty=] and
289-
|options|'s {{FileSystemRemoveOptions/recursive}} is `false`:
290-
1. [=/Reject=] |result| with an "{{InvalidModificationError}}"
291-
{{DOMException}} and abort.
292-
1. If |entry| is the [=root directory of the origin private file system=]:
293-
1. [=set/For each=] |child| of |entry|'s [=directory entry/children=]:
294-
1. Attempt to remove |child| from the underlying file system.
295-
1. If removing |child| in the underlying file system throws an
296-
exception, [=/reject=] |result| with that exception and abort.
297-
1. Set |entry|'s [=directory entry/children=] to an empty [=/set=].
298-
1. [=/Resolve=] |result| with `undefined`.
299-
300-
1. Attempt to remove |entry| from the underlying file system.
301-
1. If removing |entry| in the underlying file system throws an exception,
302-
[=/reject=] |result| with that exception and abort.
282+
1. [=Queue a task=] on the [=storage task source=] to run these steps:
283+
1. If |entry| does not exist in the underlying file system, [=/reject=]
284+
|result| with a "{{NotFoundError}}" {{DOMException}} and abort.
285+
286+
1. If |entry| is a [=directory entry=]:
287+
1. If |entry|'s [=directory entry/children=] [=set/is empty=] and
288+
|options|'s {{FileSystemRemoveOptions/recursive}} is `false`:
289+
1. [=/Reject=] |result| with an "{{InvalidModificationError}}"
290+
{{DOMException}} and abort.
291+
1. If |entry| is the [=root directory of an origin private file system=]:
292+
1. [=set/For each=] |child| of |entry|'s [=directory entry/children=]:
293+
1. Attempt to remove |child| from the underlying file system.
294+
1. If removing |child| in the underlying file system throws an
295+
exception, [=/reject=] |result| with that exception and abort.
296+
1. Set |entry|'s [=directory entry/children=] to an empty [=/set=].
297+
1. [=/Resolve=] |result| with `undefined`.
298+
299+
1. Attempt to remove |entry| from the underlying file system.
300+
1. If removing |entry| in the underlying file system throws an exception,
301+
[=/reject=] |result| with that exception and abort.
303302

304-
Note: If {{FileSystemRemoveOptions/recursive}} is `true`, the removal
305-
can fail non-atomically. Some files or directories might have been
306-
removed while other files or directories still exist.
303+
Note: If {{FileSystemRemoveOptions/recursive}} is `true`, the removal
304+
can fail non-atomically. Some files or directories might have been
305+
removed while other files or directories still exist.
307306

308-
Issue(68): Better specify what possible exceptions this could throw.
309-
1. [=/Resolve=] |result| with `undefined`.
307+
Issue(68): Better specify what possible exceptions this could throw.
308+
1. [=/Resolve=] |result| with `undefined`.
310309

311310
1. Return |result|.
312311

@@ -1354,7 +1353,7 @@ partial interface StorageManager {
13541353

13551354
<div class="note domintro">
13561355
: |directoryHandle| = await navigator . storage . {{StorageManager/getDirectory()}}
1357-
:: Returns the <dfn for="directory entry">root directory of the origin private file system</dfn>.
1356+
:: Returns the <dfn for="directory entry">root directory of an origin private file system</dfn>.
13581357
</div>
13591358

13601359
<div algorithm>

0 commit comments

Comments
 (0)