1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
denoland-deno/tests/cat.ts
Ryan Dahl bcbbee7399 Adds basic File I/O and FD table.
Adds deno.stdin, deno.stdout, deno.stderr, deno.open(), deno.write(),
deno.read(), deno.Reader, deno.Writer, deno.copy().

Fixes #721. tests/cat.ts works.
2018-09-28 20:53:33 -04:00

11 lines
226 B
TypeScript

import { stdout, open, copy, args } from "deno";
async function main() {
for (let i = 1; i < args.length; i++) {
let filename = args[i];
let file = await open(filename);
await copy(stdout, file);
}
}
main();