ディレクトリがなければ作成する (node.js)
const fs = require('fs');
const path = 'ファイルパス';
if (!fs.existsSync(path)) {
fs.mkdirSync(path, { recursive: true });
}
参考
Node.js v10.12.0からは再帰的にディレクトリを作成できる。
ディレクトリがなければ作成するNode.jsのコード
投稿日 : 2021年12月20日 - yoshiweb - カテゴリ: 雑記
コメント
投稿者 : y2mate.ws
2025年09月18日 06時57分13秒
投稿者 : www.rsstop10.com
I visited several websites except the audio quality for audio songs current at
this web page is really superb.
this web page is really superb.
2025年11月07日 13時19分41秒
投稿者 : gay0day
This was useful. It shows why certain adult sites feel simpler to use
2025年12月29日 20時39分42秒
looking at many of the articles I realized it's new to me.
Anyhow, I'm definitely happy I discovered it and I'll be book-marking it and checking back often!