We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is there a better way to create a folder structure than nesting mkdirs?
var dir = 'companies/' + newCompany.number; fs.mkdir(dir, function(err) { if (err) console.error(err); fs.mkdir(dir + '/pdfs', function(err) { if (err) console.error(err); fs.mkdir(dir + '/fonts', function(err) { if (err) console.error(err); fs.mkdir(dir + '/users', function(err) { if (err) console.error(err); }); }); }); });
The text was updated successfully, but these errors were encountered:
Please post general questions on using node to nodejs/help.
There is a documented recursive option to mkdir: https://nodejs.org/api/fs.html#fs_fs_mkdir_path_options_callback
Sorry, something went wrong.
No branches or pull requests
is there a better way to create a folder structure than nesting mkdirs?
The text was updated successfully, but these errors were encountered: