@@ -6,6 +6,7 @@ Text Macro: TWITTER whatfilesystem
66Text Macro : LATESTRD 2023-09
77Abstract : File System defines infrastructure for file systems as well as their API.
88Translation : ja https://triple-underscore.github.io/fs-ja.html
9+ Translation : zh-Hans https://htmlspecs.com/fs/
910Indent : 2
1011Markup Shorthands : css no, markdown yes
1112</pre>
@@ -438,7 +439,7 @@ Note: A {{FileSystemFileHandle}}'s associated [=FileSystemHandle/locator=]'s
438439
439440<div algorithm>
440441To
441- <dfn data-lt="creating a child FileSystemFileHandle">create a child `FileSystemFileHandle`</code></ dfn>
442+ <dfn data-lt="creating a child FileSystemFileHandle">create a child `FileSystemFileHandle`</dfn>
442443given a [=directory locator=] |parentLocator| and a string |name| in a [=/Realm=] |realm|:
443444
4444451. Let |handle| be a [=new=] {{FileSystemFileHandle}} in |realm|.
@@ -677,7 +678,7 @@ dictionary FileSystemRemoveOptions {
677678
678679[Exposed=(Window,Worker), SecureContext, Serializable]
679680interface FileSystemDirectoryHandle : FileSystemHandle {
680- async iterable <USVString, FileSystemHandle>;
681+ async_iterable <USVString, FileSystemHandle>;
681682
682683 Promise<FileSystemFileHandle> getFileHandle(USVString name, optional FileSystemGetFileOptions options = {});
683684 Promise<FileSystemDirectoryHandle> getDirectoryHandle(USVString name, optional FileSystemGetDirectoryOptions options = {});
@@ -740,7 +741,7 @@ in a [=/Realm=] |realm|:
740741 might or might not be included. No guarantees are given either way.
741742</div>
742743
743- Issue(15): In the future we might want to add arguments to the async iterable declaration to
744+ Issue(15): In the future we might want to add arguments to the async_iterable declaration to
744745support for example recursive iteration.
745746
746747<div algorithm="iterator initialization">
@@ -1346,9 +1347,9 @@ runs these steps:
13461347 :: Resizes the file associated with |stream| to be |size| bytes long. If |size| is larger than
13471348 the current file size this pads the file with null bytes, otherwise it truncates the file.
13481349
1349- The file cursor is updated when {{truncate}} is called. If the cursor is smaller than |size|,
1350- it remains unchanged. If the cursor is larger than |size|, it is set to |size| to
1351- ensure that subsequent writes do not error.
1350+ The file cursor is updated when {{FileSystemWritableFileStream/ truncate()|truncate }} is called.
1351+ If the cursor is smaller than |size|, it remains unchanged. If the cursor is larger than
1352+ |size|, it is set to |size| to ensure that subsequent writes do not error.
13521353
13531354 No changes are written to the actual file until on disk until the stream has been closed.
13541355 Changes are typically written to a temporary file instead.
@@ -1391,9 +1392,9 @@ The <dfn method for=FileSystemWritableFileStream>seek(|position|)</dfn> method s
13911392 :: Resizes the file associated with |stream| to be |size| bytes long. If |size| is larger than
13921393 the current file size this pads the file with null bytes, otherwise it truncates the file.
13931394
1394- The file cursor is updated when {{truncate}} is called. If the cursor is smaller than |size|,
1395- it remains unchanged. If the cursor is larger than |size|, it is set to |size| to
1396- ensure that subsequent writes do not error.
1395+ The file cursor is updated when {{FileSystemWritableFileStream/ truncate()|truncate }} is called.
1396+ If the cursor is smaller than |size|, it remains unchanged. If the cursor is larger than
1397+ |size|, it is set to |size| to ensure that subsequent writes do not error.
13971398
13981399 No changes are written to the actual file until on disk until the stream has been closed.
13991400 Changes are typically written to a temporary file instead.
@@ -1509,7 +1510,7 @@ The <dfn method for=FileSystemSyncAccessHandle>read(|buffer|, {{FileSystemReadWr
15091510 : |handle| . {{FileSystemSyncAccessHandle/write()|write}} (|buffer|, { {{FileSystemReadWriteOptions/at}} })
15101511 :: Writes the content of |buffer| into the file associated with |handle|, optionally at a given offset, and returns the number of written bytes.
15111512 Checking the returned number of written bytes allows callers to detect and handle errors and partial writes.
1512- :: The file cursor is updated when {{write}} is called to point to the byte after the last byte written.
1513+ :: The file cursor is updated when {{FileSystemSyncAccessHandle/write()| write}} is called to point to the byte after the last byte written.
15131514</div>
15141515
15151516<!-- TODO(fivedots): Figure out how to properly check the available storage quota (in this method and others) by passing the right storage shelf. -->
@@ -1570,7 +1571,7 @@ The <dfn method for=FileSystemSyncAccessHandle>write(|buffer|, {{FileSystemReadW
15701571 : |handle| . {{FileSystemSyncAccessHandle/truncate()|truncate}} (|newSize|)
15711572 :: Resizes the file associated with |handle| to be |newSize| bytes long. If |newSize| is larger than the current file size this pads the file with null bytes; otherwise it truncates the file.
15721573
1573- :: The file cursor is updated when {{truncate}} is called. If the cursor is smaller than |newSize|, it remains unchanged. If the cursor is larger than |newSize|, it is set to |newSize|.
1574+ :: The file cursor is updated when {{FileSystemSyncAccessHandle/truncate()| truncate}} is called. If the cursor is smaller than |newSize|, it remains unchanged. If the cursor is larger than |newSize|, it is set to |newSize|.
15741575</div>
15751576
15761577<div algorithm>
@@ -1637,7 +1638,7 @@ The <dfn method for=FileSystemSyncAccessHandle>flush()</dfn> method steps are:
163716381. Attempt to transfer all cached modifications of the file's content to the
16381639 file system's underlying storage device.
16391640
1640- Note: This is also known as flushing. This may be a no-op on some file
1641+ Note: This is also known as flushing. This can be a no-op on some file
16411642 systems, such as in-memory file systems, which do not have a "disk" to flush
16421643 to.
16431644
0 commit comments