Skip to content

Instantly share code, notes, and snippets.

@numb86
Last active August 25, 2020 12:39
Show Gist options
  • Save numb86/1bd65079ceafc1c23fce14915af37178 to your computer and use it in GitHub Desktop.
Save numb86/1bd65079ceafc1c23fce14915af37178 to your computer and use it in GitHub Desktop.
// https://numb86-tech.hatenablog.com/entry/2020/08/25/213828
const fileName = Deno.args[0];
const filePath = `${Deno.cwd()}/${fileName}`;
const fileData = await Deno.readFile(filePath);
const decoder = new TextDecoder("utf-8");
const fileText = decoder.decode(fileData);
console.log(fileText);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment