@@ -241,7 +241,7 @@ Each [=/file system locator=] has an associated <dfn export for="file system loc
241
241
a <dfn export for="file system locator" id=locator-kind>kind</dfn> (a {{FileSystemHandleKind}} ), and
242
242
a <dfn export for="file system locator" id=locator-root>root</dfn> (a [=file system root=] ).
243
243
244
- Issue(103 ): Consider giving each locator a Storage Bucket .
244
+ Issue(109 ): Consider giving each locator a [=storage bucket=] .
245
245
246
246
A <dfn export>file locator</dfn> is a [=/file system locator=] whose
247
247
[=file system locator/kind=] is {{FileSystemHandleKind/"file"}} .
@@ -341,6 +341,20 @@ A {{FileSystemHandle}} object is associated with a <dfn for=FileSystemHandle exp
341
341
Note: Multiple {{FileSystemHandle}} objects can have
342
342
[=the same locator as|the same=] [=/file system locator=] .
343
343
344
+ A {{FileSystemHandle}}
345
+ <dfn for=FileSystemHandle export>is in an origin private file system</dfn>
346
+ if the first [=list/item=] of its [=FileSystemHandle/locator=] 's
347
+ [=file system locator/path=] is the empty string.
348
+
349
+ Note: This is a bit magical, but it works since only the root directory of an
350
+ [=origin private file system=] can have a [=file system locator/path=] which
351
+ [=list/contains=] an empty string. See {{StorageManager/getDirectory()}} .
352
+ All other [=list/item=] s of a [=file system locator/path=] will be a
353
+ [=valid file name=] .
354
+
355
+ Issue(109): Consider improving this situation by giving each locator a
356
+ [=storage bucket=] .
357
+
344
358
<div algorithm="serialization steps">
345
359
{{FileSystemHandle}} objects are [=serializable objects=] .
346
360
@@ -594,8 +608,8 @@ The <dfn method for=FileSystemFileHandle>createWritable(|options|)</dfn> method
594
608
The returned {{FileSystemSyncAccessHandle}} offers synchronous methods. This allows for higher performance
595
609
on contexts where asynchronous operations come with high overhead, e.g., WebAssembly.
596
610
597
- For the time being, this method will only succeed when the |fileHandle| belongs to the
598
- [=origin private file system=] .
611
+ For the time being, this method will only succeed when the |fileHandle|
612
+ [=FileSystemHandle/is in an origin private file system=] .
599
613
</div>
600
614
601
615
<div algorithm>
@@ -605,6 +619,9 @@ The <dfn method for=FileSystemFileHandle>createSyncAccessHandle()</dfn> method s
605
619
1. Let |locator| be [=this=] 's [=FileSystemHandle/locator=] .
606
620
1. Let |realm| be [=this=] 's [=relevant Realm=] .
607
621
1. Let |global| be [=this=] 's [=relevant global object=] .
622
+ 1. Let |isInAnOriginPrivateFileSystem| be true if
623
+ [=this=] [=FileSystemHandle/is in an origin private file system=] ;
624
+ otherwise false.
608
625
1. [=Enqueue the following steps=] to the [=file system queue=] :
609
626
1. Let |entry| be the result of [=locating an entry=] given |locator|.
610
627
1. Let |accessResult| be the result of running |entry|'s
@@ -615,15 +632,15 @@ The <dfn method for=FileSystemFileHandle>createSyncAccessHandle()</dfn> method s
615
632
|accessResult|'s [=file system access result/error name=] and
616
633
abort these steps.
617
634
635
+ 1. If |isInAnOriginPrivateFileSystem| is false,
636
+ [=queue a storage task=] with |global| to
637
+ [=/reject=] |result| with an "{{InvalidStateError}} " {{DOMException}} and
638
+ abort these steps.
639
+
618
640
1. If |entry| is `null`, [=queue a storage task=] with |global| to [=/reject=]
619
641
|result| with a "{{NotFoundError}} " {{DOMException}} and abort these steps.
620
642
1. [=Assert=] : |entry| is a [=file entry=] .
621
643
622
- 1. If |entry| does not represent a [=/file system entry=] in an
623
- [=origin private file system=] , [=queue a storage task=] with |global| to
624
- [=/reject=] |result| with an "{{InvalidStateError}} " {{DOMException}} and
625
- abort these steps.
626
-
627
644
1. Let |lockResult| be the result of [=file entry/lock/take|taking a lock=]
628
645
with "`exclusive`" on |entry|.
629
646
@@ -1653,7 +1670,7 @@ partial interface StorageManager {
1653
1670
1654
1671
<div class="note domintro">
1655
1672
: |directoryHandle| = await navigator . storage . {{StorageManager/getDirectory()}}
1656
- :: Returns the root directory of the origin private file system.
1673
+ :: Returns the root directory of the [= origin private file system=] .
1657
1674
</div>
1658
1675
1659
1676
<div algorithm>
0 commit comments