@@ -130,13 +130,13 @@ result of [=starting a new parallel queue=]. This queue is to be used for all
130
130
file sytem operations.
131
131
132
132
<div algorithm>
133
- To <dfn for="file system entry/lock">take</dfn> a [=file system entry/ lock=] with a |value| of
133
+ To <dfn for="file system entry/lock">take a lock</dfn> with a |value| of
134
134
"`exclusive`" or "`shared`" on a given [=/file system entry=] |entry|:
135
135
136
136
1. Let |lock| be the |entry|'s [=file system entry/lock=] .
137
137
1. Let |count| be the |entry|'s [=file system entry/shared lock count=] .
138
- 1. Let |hasDescendantLock | be the result of [=file system entry/lock/checking for a descendant lock=] on |entry|.
139
- 1. If |hasDescendantLock | is true :
138
+ 1. Let |descendantLockStatus | be the result of [=file system entry/lock/checking for a descendant lock=] on |entry|.
139
+ 1. If |descendantLockStatus | is "`taken`" :
140
140
1. Return "`failure`".
141
141
1. If |value| is "`exclusive`":
142
142
1. If |lock| is "`open`":
@@ -162,13 +162,13 @@ To <dfn for="file system entry/lock">check for a descendant lock</dfn> on a give
162
162
163
163
1. Let |lock| be the |entry|'s [=file system entry/lock=] .
164
164
1. If |lock| is not "`open`":
165
- 1. Return true .
165
+ 1. Return "`taken`" .
166
166
1. If |entry| is a [=directory entry=] :
167
167
1. [=set/For each=] |child| of |entry|'s [=directory entry/children=] :
168
- 1. Let |hasDescendantLock | be the result of [=file system entry/lock/checking for a descendant lock=] on |child|.
169
- 1. If |hasDescendantLock | is true :
170
- 1. Return true .
171
- 1. Return false .
168
+ 1. Let |descendantLockStatus | be the result of [=file system entry/lock/checking for a descendant lock=] on |child|.
169
+ 1. If |descendantLockStatus | is "`taken`" :
170
+ 1. Return "`taken`" .
171
+ 1. Return "`open`" .
172
172
173
173
Note: These steps have to be run on the [=file system queue=] .
174
174
@@ -558,7 +558,7 @@ The <dfn method for=FileSystemFileHandle>getFile()</dfn> method steps are:
558
558
the temporary file starts out empty,
559
559
otherwise the existing file is first copied to this temporary file.
560
560
561
- Creating a {{FileSystemWritableFileStream}} [=file system entry/lock/take|takes a shared lock=] on the
561
+ Creating a {{FileSystemWritableFileStream}} [=file system entry/lock/take a lock |takes a shared lock=] on the
562
562
[=file entry=] [=locate an entry|locatable=] with |fileHandle|'s [=FileSystemHandle/locator=] .
563
563
This prevents the creation of {{FileSystemSyncAccessHandle|FileSystemSyncAccessHandles}}
564
564
for the entry, until the stream is closed.
@@ -595,7 +595,7 @@ The <dfn method for=FileSystemFileHandle>createWritable(|options|)</dfn> method
595
595
|result| with a "{{NotFoundError}} " {{DOMException}} and abort these steps.
596
596
1. [=Assert=] : |entry| is a [=file entry=] .
597
597
598
- 1. Let |lockResult| be the result of [=file system entry/lock/take|taking a lock=]
598
+ 1. Let |lockResult| be the result of [=file system entry/lock/take a lock |taking a lock=]
599
599
with "`shared`" on |entry|.
600
600
601
601
1. [=Queue a storage task=] with |global| to run these steps:
@@ -623,7 +623,7 @@ The <dfn method for=FileSystemFileHandle>createWritable(|options|)</dfn> method
623
623
[=file entry=] [=locate an entry|locatable=] by |fileHandle|'s [=FileSystemHandle/locator=] .
624
624
To ensure the changes are reflected in this file, the handle can be flushed.
625
625
626
- Creating a {{FileSystemSyncAccessHandle}} [=file system entry/lock/take|takes an exclusive lock=] on the
626
+ Creating a {{FileSystemSyncAccessHandle}} [=file system entry/lock/take a lock |takes an exclusive lock=] on the
627
627
[=file entry=] [=locate an entry|locatable=] with |fileHandle|'s [=FileSystemHandle/locator=] .
628
628
This prevents the creation of further {{FileSystemSyncAccessHandle|FileSystemSyncAccessHandles}}
629
629
or {{FileSystemWritableFileStream|FileSystemWritableFileStreams}}
@@ -665,7 +665,7 @@ The <dfn method for=FileSystemFileHandle>createSyncAccessHandle()</dfn> method s
665
665
|result| with a "{{NotFoundError}} " {{DOMException}} and abort these steps.
666
666
1. [=Assert=] : |entry| is a [=file entry=] .
667
667
668
- 1. Let |lockResult| be the result of [=file system entry/lock/take|taking a lock=]
668
+ 1. Let |lockResult| be the result of [=file system entry/lock/take a lock |taking a lock=]
669
669
with "`exclusive`" on |entry|.
670
670
671
671
1. [=Queue a storage task=] with |global| to run these steps:
0 commit comments