docs(cli/ftruncateSync): use openSync in example (#10485)

This commit is contained in:
Casper Beyer 2021-05-04 15:47:11 +08:00 committed by GitHub
parent d21380728f
commit 17118c41e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2363,7 +2363,7 @@ declare namespace Deno {
*
* ```ts
* // truncate the entire file
* const file = Deno.open("my_file.txt", { read: true, write: true, truncate: true, create: true });
* const file = Deno.openSync("my_file.txt", { read: true, write: true, truncate: true, create: true });
* Deno.ftruncateSync(file.rid);
*
* // truncate part of the file