Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
CSSer
on Nov 22, 2022
|
parent
|
context
|
favorite
| on:
Self Hosting a Google Maps Alternative with OpenSt...
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!
okasaki
on Nov 22, 2022
[–]
It returns an error if the directory already exists (same as in Python)
uneekname
on Nov 22, 2022
|
parent
[–]
While we're on the topic, in Python there's a nice way to deal with this:
os.makedirs(path, exist_ok=True)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: