summaryrefslogtreecommitdiff
path: root/std/examples/cat.ts
blob: cf9a7cb1d5f54a105f466b7d62df5fe936e86f93 (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(file, Deno.stdout);
  file.close();
}