@@ -189,9 +189,9 @@ interface FileSystemHandle {
189
189
readonly attribute FileSystemHandleKind kind;
190
190
readonly attribute USVString name;
191
191
192
- Promise<undefined> move(USVString new_entry_name );
193
- Promise<undefined> move(FileSystemDirectoryHandle destination_directory );
194
- Promise<undefined> move(FileSystemDirectoryHandle destination_directory , USVString new_entry_name );
192
+ Promise<undefined> move(USVString newEntryName );
193
+ Promise<undefined> move(FileSystemDirectoryHandle destinationDirectory );
194
+ Promise<undefined> move(FileSystemDirectoryHandle destinationDirectory , USVString newEntryName );
195
195
196
196
Promise<boolean> isSameEntry(FileSystemHandle other);
197
197
};
@@ -239,22 +239,22 @@ The <dfn attribute for=FileSystemHandle>kind</dfn> getter steps are to return
239
239
240
240
The <dfn attribute for=FileSystemHandle>name</dfn> getter steps are to return [=this=] 's [=file system entry/name=] .
241
241
242
- ### The {{FileSystemHandle/move(destination_directory, new_entry_name )|move()}} method ### {#api-filesystemhandle-move}
242
+ ### The {{FileSystemHandle/move(destinationDirectory, newEntryName )|move()}} method ### {#api-filesystemhandle-move}
243
243
244
244
<div class="note domintro">
245
- : await |handle| . {{FileSystemHandle/move(new_entry_name )|move}} ({ {{USVString}} : |new_entry_name |})
245
+ : await |handle| . {{FileSystemHandle/move(newEntryName )|move}} ({ {{USVString}} : |newEntryName |})
246
246
:: Attempts to rename the entry represented by |handle| to
247
- |new_entry_name | in the underlying file system.
247
+ |newEntryName | in the underlying file system.
248
248
249
- : await |handle| . {{FileSystemHandle/move(destination_directory )|move}} ({ {{FileSystemDirectoryHandle}} : |destination_directory |})
250
- :: Attempts to move the entry represented by |handle| to |destination_directory |,
249
+ : await |handle| . {{FileSystemHandle/move(destinationDirectory )|move}} ({ {{FileSystemDirectoryHandle}} : |destinationDirectory |})
250
+ :: Attempts to move the entry represented by |handle| to |destinationDirectory |,
251
251
while keeping its existing name.
252
252
253
- : await |handle| . {{FileSystemHandle/move(destination_directory, new_entry_name )|move}} ({ {{FileSystemDirectoryHandle}} : |destination_directory |, {{USVString}} : |new_entry_name |})
254
- :: Attempts to move the entry represented by |handle| to |destination_directory |,
255
- as well as renaming to |new_entry_name |.
253
+ : await |handle| . {{FileSystemHandle/move(destinationDirectory, newEntryName )|move}} ({ {{FileSystemDirectoryHandle}} : |destinationDirectory |, {{USVString}} : |newEntryName |})
254
+ :: Attempts to move the entry represented by |handle| to |destinationDirectory |,
255
+ as well as renaming to |newEntryName |.
256
256
257
- If |destination_directory | is not on the same underlying filesystem, this move
257
+ If |destinationDirectory | is not on the same underlying filesystem, this move
258
258
is not guaranteed to be atomic and will involve duplicating data.
259
259
260
260
For files or directories with multiple hardlinks or symlinks, the entry
@@ -267,7 +267,7 @@ The <dfn attribute for=FileSystemHandle>name</dfn> getter steps are to return [=
267
267
</div>
268
268
269
269
<div algorithm>
270
- The <dfn method for=FileSystemHandle>move({{FileSystemDirectoryHandle}}: |destination_directory |, {{USVString}}: |new_entry_name |)</dfn>
270
+ The <dfn method for=FileSystemHandle>move({{FileSystemDirectoryHandle}}: |destinationDirectory |, {{USVString}}: |newEntryName |)</dfn>
271
271
method steps are:
272
272
273
273
1. Let |result| be [=a new promise=] .
@@ -276,28 +276,28 @@ method steps are:
276
276
1. If |entry| is the [=root directory of the origin private file system=] :
277
277
1. [=/Reject=] |result| with an "{{NoModificationAllowedError}} " {{DOMException}}
278
278
and abort.
279
- 1. Let |new_name | be |new_entry_name | if specified, otherwise [=entry/name=] .
280
- If |new_name | is invalid or deemed too dangerous, user agents should
279
+ 1. Let |newName | be |newEntryName | if specified, otherwise [=entry/name=] .
280
+ If |newName | is invalid or deemed too dangerous, user agents should
281
281
sanitize it, similar to the sanitization done when fetching something
282
282
<a spec=html>as a download</a> , or [=/reject=] |result| with a
283
283
{{TypeError}} and abort.
284
- 1. Let |new_directory | be |destination_directory | if specified, otherwise [=entry/parent=] .
285
- If |new_directory | does not exist, [=/reject=] |result| with a
284
+ 1. Let |newDirectory | be |destinationDirectory | if specified, otherwise [=entry/parent=] .
285
+ If |newDirectory | does not exist, [=/reject=] |result| with a
286
286
"{{NotFoundError}} " {{DOMException}} and abort.
287
- 1. Let |destination_entry | be an [=/entry=] in |new_directory |'s [=directory entry/children=] .
288
- 1. Set |destination_entry |'s [=entry/name=] to |new_name |.
289
- 1. If |entry| is [=the same as=] |destination_entry |,
287
+ 1. Let |destinationEntry | be an [=/entry=] in |newDirectory |'s [=directory entry/children=] .
288
+ 1. Set |destinationEntry |'s [=entry/name=] to |newName |.
289
+ 1. If |entry| is [=the same as=] |destinationEntry |,
290
290
[=/resolve=] |result| with `undefined`.
291
- 1. If |destination_entry | exists in the underlying file system:
291
+ 1. If |destinationEntry | exists in the underlying file system:
292
292
1. [=/Reject=] |result| with an "{{InvalidModificationError}} " {{DOMException}}
293
293
and abort.
294
294
295
295
1. Let |accessSource| be the result of running |entry|'s
296
296
[=entry/request access=] given "`readwrite`".
297
297
1. If |accessSource| is not "{{PermissionState/granted}} ", reject |result| with a
298
298
"{{NotAllowedError}} " {{DOMException}} and abort.
299
- 1. If |new_directory | is not [=entry/parent=] :
300
- 1. Let |accessDest| be the result of running |new_directory |'s
299
+ 1. If |newDirectory | is not [=entry/parent=] :
300
+ 1. Let |accessDest| be the result of running |newDirectory |'s
301
301
[=entry/request access=] given "`readwrite`".
302
302
1. If |accessDest| is not "{{PermissionState/granted}} ", reject |result| with a
303
303
"{{NotAllowedError}} " {{DOMException}} and abort.
@@ -307,33 +307,33 @@ method steps are:
307
307
1. If |lockResultSource| is false, [=reject=] |result| with a
308
308
"{{NoModificationAllowedError}} " {{DOMException}} and abort.
309
309
1. Let |lockResultDestination| be the result of [=file entry/lock/take|taking a lock=]
310
- with "`exclusive`" on |destination_entry |.
310
+ with "`exclusive`" on |destinationEntry |.
311
311
1. If |lockResultDestination| is false, [=reject=] |result| with a
312
312
"{{NoModificationAllowedError}} " {{DOMException}} and abort.
313
313
314
- 1. If |new_directory | does not exist in the underlying file system:
314
+ 1. If |newDirectory | does not exist in the underlying file system:
315
315
1. [=/Reject=] |result| with a "{{NotFoundError}} " {{DOMException}} and abort.
316
316
1. If |entry| does not exist in the underlying file system:
317
317
1. [=/Reject=] |result| with a "{{NotFoundError}} " {{DOMException}} and abort.
318
318
1. If |entry| is a [=directory entry=] :
319
- 1. If |entry| is in the Origin Private File System and |destination_entry | is not:
319
+ 1. If |entry| is in the Origin Private File System and |destinationEntry | is not:
320
320
1. [=set/For each=] of |entry|'s [=directory entry/children=] :
321
321
1. Run [=implementation-defined=] malware scans and safe browsing checks.
322
322
If these checks fail, [=/reject=] |result| with an
323
323
"{{AbortError}} " {{DOMException}} and abort.
324
324
1. If |entry| is a [=file entry=] :
325
- 1. If |destination_entry | is not in the Origin Private File System:
325
+ 1. If |destinationEntry | is not in the Origin Private File System:
326
326
1. Run [=implementation-defined=] malware scans and safe browsing checks.
327
327
If these checks fail, [=/reject=] |result| with an
328
328
"{{AbortError}} " {{DOMException}} and abort.
329
329
330
- 1. Attempt to move |entry| to |destination_entry | in the underlying file system.
330
+ 1. Attempt to move |entry| to |destinationEntry | in the underlying file system.
331
331
1. If the underlying move operation throws an exception, [=/reject=]
332
332
|result| with that exception and abort.
333
333
334
334
Issue(68): Better specify what possible exceptions this could throw.
335
335
336
- 1. Set |entry|'s [=entry/name=] to |new_name |.
336
+ 1. Set |entry|'s [=entry/name=] to |newName |.
337
337
338
338
1. [=/Resolve=] |result| with `undefined`.
339
339
0 commit comments