summaryrefslogtreecommitdiff
path: root/js/copy_file.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/copy_file.ts
parent1840a1971317f5b8fc6e322b3a414b7f8a593c88 (diff)
Align JSDoc to style guide.
Diffstat (limited to 'js/copy_file.ts')
-rw-r--r--js/copy_file.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/js/copy_file.ts b/js/copy_file.ts
index 1af336974..79d74e034 100644
--- a/js/copy_file.ts
+++ b/js/copy_file.ts
@@ -3,29 +3,30 @@ import * as msg from "gen/msg_generated";
import { flatbuffers } from "flatbuffers";
import * as dispatch from "./dispatch";
-/**
- * Copies the contents of a file to another by name synchronously.
+/** Copies the contents of a file to another by name synchronously.
* Creates a new file if target does not exists, and if target exists,
* overwrites original content of the target file.
+ *
* It would also copy the permission of the original file
* to the destination.
*
- * import { copyFileSync } from "deno";
- * copyFileSync("from.txt", "to.txt");
+ * import { copyFileSync } from "deno";
+ * copyFileSync("from.txt", "to.txt");
*/
export function copyFileSync(from: string, to: string): void {
dispatch.sendSync(...req(from, to));
}
-/**
- * Copies the contents of a file to another by name.
+/** Copies the contents of a file to another by name.
+ *
* Creates a new file if target does not exists, and if target exists,
* overwrites original content of the target file.
+ *
* It would also copy the permission of the original file
* to the destination.
*
- * import { copyFile } from "deno";
- * await copyFile("from.txt", "to.txt");
+ * import { copyFile } from "deno";
+ * await copyFile("from.txt", "to.txt");
*/
export async function copyFile(from: string, to: string): Promise<void> {
await dispatch.sendAsync(...req(from, to));