ai-clip-factory / src /app /server /utils /createDirIfNeeded.ts
jbilcke-hf's picture
jbilcke-hf HF staff
initial commit
9a42933
raw
history blame
184 Bytes
import { existsSync, mkdirSync } from "node:fs"
export const createDirIfNeeded = (dirPath: string) => {
if (!existsSync(dirPath)) {
mkdirSync(dirPath, { recursive: true })
}
}