(filepath: string)
| 5 | * check if directory exists |
| 6 | */ |
| 7 | export async function assertDirectoryExists(filepath: string) { |
| 8 | const exist = await fs.access(path.dirname(filepath)).then(() => true, () => false) |
| 9 | if (!exist) { |
| 10 | throw new Error(`directory (${path.dirname(filepath)}) doesn't exist`) |
| 11 | } |
| 12 | } |
no test coverage detected
searching dependent graphs…