Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
jbilcke-hf
/
community
like
0
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
42be57d
community
/
src
/
utils
/
createDirIfNeeded.mts
jbilcke-hf
HF Staff
initial commit
b2d7d99
over 1 year ago
raw
Copy download link
history
blame
Safe
184 Bytes
import
{ existsSync, mkdirSync }
from
"node:fs"
export
const
createDirIfNeeded
= (
dirPath:
string
) => {
if
(!
existsSync
(dirPath)) {
mkdirSync
(dirPath, {
recursive
:
true
})
}
}