mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Remove doc strings from cli/js TS files (#4329)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
This commit is contained in:
parent
3ac642c183
commit
e435c2be15
87 changed files with 0 additions and 2025 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue