From ce02167c75c42e2e2f85a98128d70504e88da02b Mon Sep 17 00:00:00 2001 From: dubiousjim Date: Fri, 3 Apr 2020 11:00:16 -0400 Subject: Improve tests and docs for Deno.rename (#4597) --- cli/js/lib.deno.ns.d.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'cli/js/lib.deno.ns.d.ts') diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts index 9cef597a4..b76fac1a5 100644 --- a/cli/js/lib.deno.ns.d.ts +++ b/cli/js/lib.deno.ns.d.ts @@ -1284,8 +1284,10 @@ declare namespace Deno { * * Deno.renameSync("old/path", "new/path"); * - * Throws error if attempting to rename to a directory which exists and is not - * empty. + * On Unix, this operation does not follow symlinks at either path. + * + * It varies between platforms when the operation throws errors, and if so what + * they are. It's always an error to rename anything to a non-empty directory. * * Requires `allow-read` and `allow-write` permissions. */ export function renameSync(oldpath: string, newpath: string): void; @@ -1297,10 +1299,12 @@ declare namespace Deno { * * await Deno.rename("old/path", "new/path"); * - * Throws error if attempting to rename to a directory which exists and is not - * empty. + * On Unix, this operation does not follow symlinks at either path. + * + * It varies between platforms when the operation throws errors, and if so what + * they are. It's always an error to rename anything to a non-empty directory. * - * Requires `allow-read` and `allow-write`. */ + * Requires `allow-read` and `allow-write` permission. */ export function rename(oldpath: string, newpath: string): Promise; /** Synchronously reads and returns the entire contents of a file as an array -- cgit v1.2.3