Cleanup comments and internal variables (#4205)

This commit is contained in:
dubiousjim 2020-03-02 10:19:42 -05:00 committed by GitHub
parent 809019dc6e
commit 6cd46fa3ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 681 additions and 572 deletions

View file

@ -13,21 +13,21 @@ function coerceLen(len?: number): number {
return len;
}
/** Truncates or extends the specified file synchronously, updating the size of
* this file to become size.
/** Synchronously truncates or extends the specified file, to reach the
* specified `len`.
*
* Deno.truncateSync("hello.txt", 10);
*/
*
* Requires `allow-write` permission. */
export function truncateSync(name: string, len?: number): void {
sendSync("op_truncate", { name, len: coerceLen(len) });
}
/**
* Truncates or extends the specified file, updating the size of this file to
* become size.
/** Truncates or extends the specified file, to reach the specified `len`.
*
* await Deno.truncate("hello.txt", 10);
*/
*
* Requires `allow-write` permission. */
export async function truncate(name: string, len?: number): Promise<void> {
await sendAsync("op_truncate", { name, len: coerceLen(len) });
}