Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
CSSer
· 4y ago · 0 comments
Out of curiosity, what’s the motivation to error suppress the mkdir call here (my PHP is rusty)? Anyway, this is great. Thank you for sharing!
Comments
[–]
okasaki
4y ago
It returns an error if the directory already exists (same as in Python)
[–]
uneekname
4y ago
While we're on the topic, in Python there's a nice way to deal with this:
os.makedirs(path, exist_ok=True)