Programming/node.js2019.04.10 17:01

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]

Posted by 구차니

댓글을 달아 주세요