node.js 10.x 부터 지원하는 녀석으로(native support)
recursive 옵션을 주고 mkdir 하는게 가장 깔끔할 듯
fs.mkdirSync(targetDir, { recursive: true }); |
[링크 : https://nodejs.org/api/fs.html#fs_fs_mkdirsync_path_options]
[링크 : https://www.npmjs.com/package/mkdirp]
[링크 : https://github.com/shelljs/shelljs]
[링크 : https://stackoverflow.com/questions/31645738/how-to-create-full-path-with-nodes-fs-mkdirsync]
'Programming > node.js' 카테고리의 다른 글
proxy error: Error: write after end (0) | 2019.04.15 |
---|---|
https cache proxy using node.js (0) | 2019.04.12 |
http-mitm-proxy 예제 (0) | 2019.04.08 |
node.js 구버전 모듈에러 TypeError: path.existsSync is not a function (0) | 2019.04.05 |
node.js mitm proxy (for https) (0) | 2019.04.02 |