summaryrefslogtreecommitdiff
path: root/js/rename.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-10-15 07:29:50 +1100
committerRyan Dahl <ry@tinyclouds.org>2018-10-14 17:38:23 -0400
commit10a97679ac80b4304c75d33cbc59c5736d11deb1 (patch)
treeb51b9183ed251f61373069e5c4d35e39603bedb2 /js/rename.ts
parent1840a1971317f5b8fc6e322b3a414b7f8a593c88 (diff)
Align JSDoc to style guide.
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));