From 6cd46fa3ef4b12f35a60f1a33c7f038c06b5fc71 Mon Sep 17 00:00:00 2001 From: dubiousjim Date: Mon, 2 Mar 2020 10:19:42 -0500 Subject: Cleanup comments and internal variables (#4205) --- cli/js/truncate.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cli/js/truncate.ts') diff --git a/cli/js/truncate.ts b/cli/js/truncate.ts index 17c08674c..d784b3614 100644 --- a/cli/js/truncate.ts +++ b/cli/js/truncate.ts @@ -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 { await sendAsync("op_truncate", { name, len: coerceLen(len) }); } -- cgit v1.2.3