You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[=this=]'s [=FileSystemSyncAccessHandle/file position cursor=].
@@ -1137,7 +1139,8 @@ The <dfn method for=FileSystemSyncAccessHandle>write(|buffer|, {{FileSystemReadW
1137
1139
1. Set |tail| to a [=byte sequence=] containing the last
1138
1140
|oldSize| − (|writePosition| + |bufferSize|) bytes of |fileContents|.
1139
1141
1. Let |newSize| be |head|'s [=byte sequence/length=] + |bufferSize| + |tail|'s [=byte sequence/length=].
1140
-
1. If |newSize| − |oldSize| exceeds the available [=storage quota=], throw a {{QuotaExceededError}}.
1142
+
1. If |newSize| − |oldSize| exceeds the available [=storage quota=],
1143
+
throw a "{{QuotaExceededError}}" {{DOMException}}.
1141
1144
1. Set [=this=].[=FileSystemSyncAccessHandle/[[file]]=]'s [=file entry/binary data=] to the concatenation of |head|, the contents of |buffer| and |tail|.
1142
1145
1143
1146
Note: The mechanism used to access buffer's contents is left purposely vague.
@@ -1151,7 +1154,7 @@ The <dfn method for=FileSystemSyncAccessHandle>write(|buffer|, {{FileSystemReadW
1151
1154
1. Let |bytesWritten| be the number of bytes that were written from |buffer|.
1152
1155
1. Set [=this=]'s [=FileSystemSyncAccessHandle/file position cursor=] to |writePosition| + |bytesWritten|.
1153
1156
1. Return |bytesWritten|.
1154
-
1. Otherwise throw an {{InvalidStateError}}.
1157
+
1. Otherwise throw an "{{InvalidStateError}}" {{DOMException}}.
1155
1158
1. Set [=this=]'s [=FileSystemSyncAccessHandle/file position cursor=] to |writePosition| + |bufferSize|.
1156
1159
1. Return |bufferSize|.
1157
1160
@@ -1169,23 +1172,24 @@ The <dfn method for=FileSystemSyncAccessHandle>write(|buffer|, {{FileSystemReadW
1169
1172
<div algorithm>
1170
1173
The <dfn method for=FileSystemSyncAccessHandle>truncate(|newSize|)</dfn> method steps are:
1171
1174
1172
-
1. If [=this=].[=[[state]]=] is "`closed`", throw an {{InvalidStateError}}.
1175
+
1. If [=this=].[=[[state]]=] is "`closed`", throw an "{{InvalidStateError}}"
1176
+
{{DOMException}}.
1173
1177
1. Let |fileContents| be a copy of [=this=].[=FileSystemSyncAccessHandle/[[file]]=]'s [=file entry/binary data=].
1174
1178
1. 1. Let |oldSize| be the [=byte sequence/length=] of [=this=].[=FileSystemSyncAccessHandle/[[file]]=]'s [=file entry/binary data=].
1175
1179
1. If the underlying file system does not support setting a file's size to
1176
1180
|newSize|, throw a {{TypeError}}.
1177
1181
1. If |newSize| is larger than |oldSize|:
1178
-
1. If |newSize| − |oldSize| exceeds the available [=storage quota=], throw a {{QuotaExceededError}}.
1182
+
1. If |newSize| − |oldSize| exceeds the available [=storage quota=], throw a "{{QuotaExceededError}}" {{DOMException}}.
1179
1183
1. Set [=this=].[=FileSystemSyncAccessHandle/[[file]]=]'s to a [=byte sequence=] formed by concatenating
1. If the operations modifying the [=this=].[=FileSystemSyncAccessHandle/[[file]]=]'s [=file entry/binary data=] in the previous steps
1183
-
failed, throw an {{InvalidStateError}}.
1187
+
failed, throw an "{{InvalidStateError}}" {{DOMException}}.
1184
1188
1. Otherwise, if |newSize| is smaller than |oldSize|:
1185
1189
1. Set [=this=].[=FileSystemSyncAccessHandle/[[file]]=]'s to a [=byte sequence=] containing the first |newSize| bytes
1186
1190
in |fileContents|.
1187
1191
1. If the operations modifying the [=this=].[=FileSystemSyncAccessHandle/[[file]]=]'s [=file entry/binary data=] in the previous steps
1188
-
failed, throw an {{InvalidStateError}}.
1192
+
failed, throw an "{{InvalidStateError}}" {{DOMException}}.
1189
1193
1. If [=this=]'s [=FileSystemSyncAccessHandle/file position cursor=] is greater than |newSize|, then set [=FileSystemSyncAccessHandle/file position cursor=] to |newSize|.
1190
1194
1191
1195
</div>
@@ -1200,7 +1204,8 @@ The <dfn method for=FileSystemSyncAccessHandle>truncate(|newSize|)</dfn> method
1200
1204
<div algorithm>
1201
1205
The <dfn method for=FileSystemSyncAccessHandle>getSize()</dfn> method steps are:
1202
1206
1203
-
1. If [=this=].[=[[state]]=] is "`closed`", throw an {{InvalidStateError}}.
1207
+
1. If [=this=].[=[[state]]=] is "`closed`", throw an "{{InvalidStateError}}"
0 commit comments