Skip to content
New issue

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

mkdirp #29

Open
majg0 opened this issue Oct 11, 2018 · 1 comment
Open

mkdirp #29

majg0 opened this issue Oct 11, 2018 · 1 comment

Comments

@majg0
Copy link

majg0 commented Oct 11, 2018

If the optional folder is more than one level deep, mkdirSync will fail. I know this is true for some node versions at least, but I have not checked the latest if the API changed (I doubt it).
One solution is use package mkdirp, another is manually splitting path string and creating a folder for each.

@majg0
Copy link
Author

majg0 commented Oct 11, 2018

Note: this uses fs.exists too, but Node.js recommends issuing fs.stat to check for a folder's existence. I don't know how any of those functions react to multiple dirs away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant