diff options
author | crowlKats <crowlkats@gmail.com> | 2020-03-13 10:22:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 10:22:22 +0100 |
commit | e435c2be158ce8657dbff0664b6db222fe4e586c (patch) | |
tree | b0e72033be2ce51a70fd2c2af23e6da131a642bb /cli/js/write_file.ts | |
parent | 3ac642c183981a366e1db565c16b81f864b07ee4 (diff) |
Remove doc strings from cli/js TS files (#4329)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'cli/js/write_file.ts')
-rw-r--r-- | cli/js/write_file.ts | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/cli/js/write_file.ts b/cli/js/write_file.ts index 995335f57..5227bfece 100644 --- a/cli/js/write_file.ts +++ b/cli/js/write_file.ts @@ -4,27 +4,12 @@ import { open, openSync } from "./files.ts"; import { chmod, chmodSync } from "./ops/fs/chmod.ts"; import { writeAll, writeAllSync } from "./buffer.ts"; -/** Options for writing to a file. */ export interface WriteFileOptions { - /** Defaults to `false`. If set to `true`, will append to a file instead of - * overwriting previous contents. */ append?: boolean; - /** Sets the option to allow creating a new file, if one doesn't already - * exist at the specified path (defaults to `true`). */ create?: boolean; - /** Permissions always applied to file. */ mode?: number; } -/** Synchronously write data to the given path, by default creating a new - * file if needed, else overwriting. - * - * const encoder = new TextEncoder(); - * const data = encoder.encode("Hello world\n"); - * Deno.writeFileSync("hello.txt", data); - * - * Requires `allow-write` permission, and `allow-read` if create is `false`. - */ export function writeFileSync( path: string, data: Uint8Array, @@ -49,15 +34,6 @@ export function writeFileSync( file.close(); } -/** Write data to the given path, by default creating a new file if needed, - * else overwriting. - * - * const encoder = new TextEncoder(); - * const data = encoder.encode("Hello world\n"); - * await Deno.writeFile("hello.txt", data); - * - * Requires `allow-write` permission, and `allow-read` if create is `false`. - */ export async function writeFile( path: string, data: Uint8Array, |