ファイルの情報を取得する
ファイルの情報を取得するにはDeno.stat()もしくはDeno.lstat()を使います
https://deno.land/typedoc/index.html#stat
https://deno.land/typedoc/index.html#lstat
両者の違いは、statはシンボリックリンクを辿り、lstatは辿りません
code:sh
deno run --allow-read https://scrapbox.io/api/code/deno-ja/ファイルの情報を取得する/sample.ts filepath
filepathに調べたいファイルパスを入れて実行してください
code:sample.ts
const file = await Deno.stat(Deno.args0);
console.log(file);