node.js - File and folders create if not exist -


is there fs.create(path) if path not exist create it.

for example, fs.create('d:/test/a.txt') , create test folder , a.txt file if a.txt not exist.

i know how create file if not exist how folder's'? think simple problem. lib can that? or need parse path , create it?

the answer @thefourtheye, use fs-extra module's createfile


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

c++ - How to test/verify that zero-initialization takes place -

node.js - Webpack/TypeScript Raising Errors When node_modules is Excluded -