summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authordubiousjim <dubiousjim@gmail.com>2020-04-03 11:00:16 -0400
committerGitHub <noreply@github.com>2020-04-03 11:00:16 -0400
commitce02167c75c42e2e2f85a98128d70504e88da02b (patch)
treeb75a520b9aae1711c0045af91b6d88b1ad89fc84 /cli/js/lib.deno.ns.d.ts
parentd8f32c7eff02fb62250e06c1bb1eda95b86a52a7 (diff)
Improve tests and docs for Deno.rename (#4597)
Diffstat (limited to 'cli/js/lib.deno.ns.d.ts')
-rw-r--r--cli/js/lib.deno.ns.d.ts14
1 files changed, 9 insertions, 5 deletions
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<void>;
/** Synchronously reads and returns the entire contents of a file as an array