deno_tuto/examples/file.ts
2021-02-18 18:31:25 +01:00

10 lines
233 B
TypeScript

// Run this example using
// deno run --allow-read examples/file.ts
const filenames = Deno.args;
for (const filename of filenames) {
const file = await Deno.open(filename);
await Deno.copy(file, Deno.stdout);
file.close();
}