Remove doc strings from cli/js TS files (#4329)

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
This commit is contained in:
crowlKats 2020-03-13 10:22:22 +01:00 committed by GitHub
parent 3ac642c183
commit e435c2be15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 0 additions and 2025 deletions

View file

@ -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,