mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 05:34:49 +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
|
@ -2,13 +2,6 @@
|
|||
import { open, openSync } from "./files.ts";
|
||||
import { readAll, readAllSync } from "./buffer.ts";
|
||||
|
||||
/** Reads and returns the entire contents of a file.
|
||||
*
|
||||
* const decoder = new TextDecoder("utf-8");
|
||||
* const data = Deno.readFileSync("hello.txt");
|
||||
* console.log(decoder.decode(data));
|
||||
*
|
||||
* Requires `allow-read` permission. */
|
||||
export function readFileSync(path: string): Uint8Array {
|
||||
const file = openSync(path);
|
||||
const contents = readAllSync(file);
|
||||
|
@ -16,13 +9,6 @@ export function readFileSync(path: string): Uint8Array {
|
|||
return contents;
|
||||
}
|
||||
|
||||
/** Reads and resolves to the entire contents of a file.
|
||||
*
|
||||
* const decoder = new TextDecoder("utf-8");
|
||||
* const data = await Deno.readFile("hello.txt");
|
||||
* console.log(decoder.decode(data));
|
||||
*
|
||||
* Requires `allow-read` permission. */
|
||||
export async function readFile(path: string): Promise<Uint8Array> {
|
||||
const file = await open(path);
|
||||
const contents = await readAll(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue