Skip to content

Commit b808bdb

Browse files
committed
un-special-case OPFS root
1 parent 8612ea5 commit b808bdb

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

index.bs

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ if |a| and |b| are backed by the same file or directory on the local file system
158158
<div algorithm>
159159

160160
To <dfn for="file system locator" id=locator-resolve>resolve</dfn> a
161-
[=/file system locator=] |child| relative to a [=directory locator=] |root|,
162-
run these steps:
161+
[=/file system locator=] |child| relative to a [=directory locator=] |root|:
163162

164163
1. Let |result| be [=a new promise=].
165164
1. Run these steps [=in parallel=]:
@@ -231,8 +230,13 @@ these constraints:
231230
<ul>
232231
<li><p>If |locator| is a [=file locator=], they return a [=file entry=] or null.
233232
<li><p>If |locator| is a [=directory locator=], they return a [=directory entry=] or null.
234-
<li><p>If these steps return |entry|, then [=getting the locator=] with |entry| returns |locator|,
235-
provided no intermediate file system operations were run.
233+
<li><p>If these steps return |entry|, then:
234+
<ul>
235+
<li><p>[=Getting the locator=] with |entry| returns |locator|,
236+
provided no intermediate file system operations were run.
237+
<li><p>|entry|'s [=file system entry/name=] must be the same [=string=] as
238+
the last [=list/item=] of |locator|'s [=file system locator/path=].
239+
</ul>
236240
</ul>
237241
</div>
238242

@@ -244,8 +248,13 @@ constraints:
244248
<ul>
245249
<li><p>If |entry| is a [=file entry=], they return a [=file locator=].
246250
<li><p>If |entry| is a [=directory entry=], they return a [=directory locator=].
247-
<li><p>If these steps return |locator|, then [=locating an entry=] with |locator| returns |entry|,
248-
provided no intermediate file system operations were run.
251+
<li><p>If these steps return |locator|, then:
252+
<ul>
253+
<li><p>[=Locating an entry=] with |locator| returns |entry|,
254+
provided no intermediate file system operations were run.
255+
<li><p>|entry|'s [=file system entry/name=] must be the same [=string=] as
256+
the last [=list/item=] of |locator|'s [=file system locator/path=].
257+
</ul>
249258
</ul>
250259
</div>
251260

@@ -332,9 +341,8 @@ The <dfn attribute for=FileSystemHandle>kind</dfn> getter steps are to return
332341
[=this=]'s [=FileSystemHandle/locator=]'s [=file system locator/kind=].
333342

334343
The <dfn attribute for=FileSystemHandle>name</dfn> getter steps are to return
335-
the empty [=string=] if [=this=] is the root directory of the
336-
[=origin private file system=]; otherwise the last [=list/item=] (a [=string=])
337-
of [=this=]'s [=FileSystemHandle/locator=]'s [=file system locator/path=].
344+
the last [=list/item=] (a [=string=]) of
345+
[=this=]'s [=FileSystemHandle/locator=]'s [=file system locator/path=].
338346

339347
### The {{FileSystemHandle/isSameEntry()}} method ### {#api-filesystemhandle-issameentry}
340348

@@ -395,9 +403,10 @@ given a [=directory locator=] |parentLocator| and a string |name| in a [=/Realm=
395403
</div>
396404

397405
<div algorithm>
398-
To <dfn export data-lt="creating a new FileSystemFileHandle">create a new <code>FileSystemFileHandle</code></dfn>
406+
To
407+
<dfn export data-lt="creating a new FileSystemFileHandle">create a new <code>FileSystemFileHandle</code></dfn>
399408
given a [=/file system root=] |root| and a [=/file system path=] |path|
400-
in a [=/Realm=] |realm|, run these steps:
409+
in a [=/Realm=] |realm|:
401410

402411
1. Let |handle| be a [=new=] {{FileSystemFileHandle}} in |realm|.
403412
1. Set |handle|'s [=FileSystemHandle/locator=] to a [=/file system locator=] whose
@@ -615,9 +624,10 @@ given a [=directory locator=] |parentLocator| and a string |name| in a [=/Realm=
615624
</div>
616625

617626
<div algorithm>
618-
To <dfn export data-lt="creating a new FileSystemDirectoryHandle">create a new <code>FileSystemDirectoryHandle</code></dfn>
627+
To
628+
<dfn export data-lt="creating a new FileSystemDirectoryHandle">create a new <code>FileSystemDirectoryHandle</code></dfn>
619629
given a [=/file system root=] |root| and a [=/file system path=] |path|
620-
in a [=/Realm=] |realm|, run these steps:
630+
in a [=/Realm=] |realm|:
621631

622632
1. Let |handle| be a [=new=] {{FileSystemDirectoryHandle}} in |realm|.
623633
1. Set |handle|'s [=FileSystemHandle/locator=] to a [=/file system locator=] whose
@@ -1542,7 +1552,7 @@ The <dfn method for=StorageManager>getDirectory()</dfn> method steps are:
15421552
1. Set |map|["root"] to |dir|.
15431553

15441554
1. Let |root| be an [=implementation-defined=] opaque [=string=].
1545-
1. Let |path| be « ».
1555+
1. Let |path| be « the empty string ».
15461556
1. Let |handle| be the result of <a>creating a new <code>FileSystemDirectoryHandle</code></a>.
15471557
given |root| and |path| in the [=current realm=].
15481558

0 commit comments

Comments
 (0)