summaryrefslogtreecommitdiff
path: root/js/rename.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/rename.ts')
-rw-r--r--js/rename.ts23
1 files changed, 11 insertions, 12 deletions
diff --git a/js/rename.ts b/js/rename.ts
index d92538f45..153ed720a 100644
--- a/js/rename.ts
+++ b/js/rename.ts
@@ -3,25 +3,24 @@ import * as msg from "gen/msg_generated";
import { flatbuffers } from "flatbuffers";
import * as dispatch from "./dispatch";
-/**
- * Synchronously renames (moves) oldpath to newpath. If newpath already exists
- * and is not a directory, Rename replaces it. OS-specific restrictions may
- * apply when oldpath and newpath are in different directories.
+/** Synchronously renames (moves) `oldpath` to `newpath`. If `newpath` already
+ * exists and is not a directory, `renameSync()` replaces it. OS-specific
+ * restrictions may apply when `oldpath` and `newpath` are in different
+ * directories.
*
- * import { renameSync } from "deno";
- * renameSync("old/path", "new/path");
+ * import { renameSync } from "deno";
+ * renameSync("old/path", "new/path");
*/
export function renameSync(oldpath: string, newpath: string): void {
dispatch.sendSync(...req(oldpath, newpath));
}
-/**
- * Renames (moves) oldpath to newpath. If newpath already exists
- * and is not a directory, Rename replaces it. OS-specific restrictions may
- * apply when oldpath and newpath are in different directories.
+/** Renames (moves) `oldpath` to `newpath`. If `newpath` already exists and is
+ * not a directory, `rename()` replaces it. OS-specific restrictions may apply
+ * when `oldpath` and `newpath` are in different directories.
*
- * import { rename } from "deno";
- * await rename("old/path", "new/path");
+ * import { rename } from "deno";
+ * await rename("old/path", "new/path");
*/
export async function rename(oldpath: string, newpath: string): Promise<void> {
await dispatch.sendAsync(...req(oldpath, newpath));