summaryrefslogtreecommitdiff
path: root/cli/js/ops/io.ts
diff options
context:
space:
mode:
authorcrowlKats <crowlkats@gmail.com>2020-03-13 10:22:22 +0100
committerGitHub <noreply@github.com>2020-03-13 10:22:22 +0100
commite435c2be158ce8657dbff0664b6db222fe4e586c (patch)
treeb0e72033be2ce51a70fd2c2af23e6da131a642bb /cli/js/ops/io.ts
parent3ac642c183981a366e1db565c16b81f864b07ee4 (diff)
Remove doc strings from cli/js TS files (#4329)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'cli/js/ops/io.ts')
-rw-r--r--cli/js/ops/io.ts36
1 files changed, 0 insertions, 36 deletions
diff --git a/cli/js/ops/io.ts b/cli/js/ops/io.ts
index 9f53707b7..38963e360 100644
--- a/cli/js/ops/io.ts
+++ b/cli/js/ops/io.ts
@@ -10,15 +10,6 @@ import { OPS_CACHE } from "../runtime.ts";
let OP_READ = -1;
let OP_WRITE = -1;
-/** Synchronously read from a file ID into an array buffer.
- *
- * Returns `number | EOF` for the operation.
- *
- * const file = Deno.openSync("/foo/bar.txt");
- * const buf = new Uint8Array(100);
- * const nread = Deno.readSync(file.rid, buf);
- * const text = new TextDecoder().decode(buf);
- */
export function readSync(rid: number, p: Uint8Array): number | EOF {
if (p.length == 0) {
return 0;
@@ -36,15 +27,6 @@ export function readSync(rid: number, p: Uint8Array): number | EOF {
}
}
-/** Read from a resource ID into an array buffer.
- *
- * Resolves to the `number | EOF` for the operation.
- *
- * const file = await Deno.open("/foo/bar.txt");
- * const buf = new Uint8Array(100);
- * const nread = await Deno.read(file.rid, buf);
- * const text = new TextDecoder().decode(buf);
- */
export async function read(rid: number, p: Uint8Array): Promise<number | EOF> {
if (p.length == 0) {
return 0;
@@ -62,15 +44,6 @@ export async function read(rid: number, p: Uint8Array): Promise<number | EOF> {
}
}
-/** Synchronously write to the resource ID the contents of the array buffer.
- *
- * Resolves to the number of bytes written.
- *
- * const encoder = new TextEncoder();
- * const data = encoder.encode("Hello world\n");
- * const file = Deno.openSync("/foo/bar.txt", {create: true, write: true});
- * Deno.writeSync(file.rid, data);
- */
export function writeSync(rid: number, p: Uint8Array): number {
if (OP_WRITE < 0) {
OP_WRITE = OPS_CACHE["op_write"];
@@ -83,15 +56,6 @@ export function writeSync(rid: number, p: Uint8Array): number {
}
}
-/** Write to the resource ID the contents of the array buffer.
- *
- * Resolves to the number of bytes written.
- *
- * const encoder = new TextEncoder();
- * const data = encoder.encode("Hello world\n");
- * const file = await Deno.open("/foo/bar.txt", {create: true, write: true});
- * await Deno.write(file.rid, data);
- */
export async function write(rid: number, p: Uint8Array): Promise<number> {
if (OP_WRITE < 0) {
OP_WRITE = OPS_CACHE["op_write"];