summaryrefslogtreecommitdiff
path: root/std/examples/cat.ts
blob: 7b7af3145cd89ecc4a91b8248ee02ea3c57dc132 (plain)
1
2
3
4
5
6
7
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
const filenames = Deno.args;
for (const filename of filenames) {
  const file = await Deno.open(filename);
  await Deno.copy(Deno.stdout, file);
  file.close();
}