Create directory when resolving tmpName, if the directory doesn't already exist
kibertoad opened this issue · comments
Tmp Version
0.2.3
Expected Behavior
If dir
config parameter is specified to a tmpName
operation, this direction should be automatically created if it doesn't already exist.
Experienced Behavior
Currently this fails with an error about directory not existing.
dirSync
operation with fixed name
can't be used as a solution here, because it fails if directory already exists.
this is the expected behavior. tmp does not create the dir for you. you need to provide it.
@silkentrance Why is it a preferred behaviour? Isn't it pretty simple to do a recursive mkdir with zero dependencies in node?
And it's pretty inconvenient to do that in userspace.