@@ -370,7 +370,7 @@ The <dfn method for=FileSystemFileHandle>createWritable(|options|)</dfn> method
370
370
: |handle| = await |fileHandle| . {{FileSystemFileHandle/createSyncAccessHandle()|createSyncAccessHandle}} ()
371
371
:: Returns a {{FileSystemSyncAccessHandle}} that can be used to read from/write to the file.
372
372
Changes made through |handle| might be immediately reflected in the file represented by |fileHandle|.
373
- To ensure the changes are reflected in this file, the handle can be flushed or closed .
373
+ To ensure the changes are reflected in this file, the handle can be flushed.
374
374
375
375
Creating a {{FileSystemSyncAccessHandle}} [=file entry/lock/take|takes an exclusive lock=] on the
376
376
[=FileSystemHandle/entry=] associated with |fileHandle|. This prevents the creation of
@@ -677,7 +677,6 @@ The <dfn method for=FileSystemDirectoryHandle>removeEntry(|name|, |options|)</df
677
677
1. [=/Reject=] |result| with a {{NotFoundError}} .
678
678
1. Return |result|.
679
679
680
-
681
680
</div>
682
681
683
682
### The {{FileSystemDirectoryHandle/resolve()}} method ### {#api-filesystemdirectoryhandle-resolve}
@@ -1198,7 +1197,6 @@ The <dfn method for=FileSystemSyncAccessHandle>getSize()</dfn> method steps are:
1198
1197
1. If [=this=] .[=[[state]]=] is "`closed`", throw an {{InvalidStateError}} .
1199
1198
1. Return [=this=] .[=FileSystemSyncAccessHandle/[[file]]=] 's [=file entry/binary data=]' s [=byte sequence/length=] .
1200
1199
1201
-
1202
1200
</div>
1203
1201
1204
1202
### The {{FileSystemSyncAccessHandle/flush()}} method ### {#api-filesystemsyncaccesshandle-flush}
@@ -1211,23 +1209,34 @@ The <dfn method for=FileSystemSyncAccessHandle>getSize()</dfn> method steps are:
1211
1209
<div algorithm>
1212
1210
The <dfn method for=FileSystemSyncAccessHandle>flush()</dfn> method steps are:
1213
1211
1214
- Issue(71): Fill in, after figuring out language to describe flushing at the OS level.
1212
+ 1. If [=this=] .[=[[state]]=] is "`closed`", [=throw=] an "{{InvalidStateError}} "
1213
+ {{DOMException}} .
1214
+ 1. Attempt to transfer all cached modifications of the file's content to the
1215
+ file system's underlying storage device.
1216
+
1217
+ Note: This is also known as flushing. This may be a no-op on some file
1218
+ systems, such as in-memory file systems, which do not have a "disk" to flush
1219
+ to.
1215
1220
1216
1221
</div>
1217
1222
1218
1223
### The {{FileSystemSyncAccessHandle/close()}} method ### {#api-filesystemsyncaccesshandle-close}
1219
1224
1220
1225
<div class="note domintro">
1221
1226
: |handle| . {{FileSystemSyncAccessHandle/close()}}
1222
- :: Flushes the access handle and then closes it. Closing an access handle disables any further operations on it and
1223
- [=file entry/lock/release|releases the lock=] on the [=FileSystemHandle/entry=] associated with |handle|.
1227
+ :: Closes the access handle. This disables any further operations on it and
1228
+ [=file entry/lock/release|releases the lock=] on the
1229
+ [=FileSystemHandle/entry=] associated with |handle|.
1224
1230
</div>
1225
1231
1226
1232
<div algorithm>
1227
1233
The <dfn method for=FileSystemSyncAccessHandle>close()</dfn> method steps are
1228
1234
to set [=this=] .[=[[state]]=] to "`closed`".
1229
1235
1230
- Issue(71): Figure out language to describe flushing the file at the OS level before closing the handle.
1236
+ Note: This method does not guarantee that all file modifications will be
1237
+ immediately reflected in the underlying storage device. Call the
1238
+ {{FileSystemSyncAccessHandle/flush()}} method first if you require this
1239
+ guarantee.
1231
1240
1232
1241
</div>
1233
1242
0 commit comments