オプションrで選択したファイル内容を表示させるコード 初めに書いたものはネストがすごく読みずらかった。 プログラム内容 async function get_data() { const filedata = []; try { await fs.access(directoryPath, fs.constants.F_OK); const files = await fs.readdir(directoryPath); if (files.length === 0) { console.log("memoはありません"); } else { for (let fileName of file…