(path: string, operation: string)
| 34 | } |
| 35 | |
| 36 | export function validatePath(path: string, operation: string): void { |
| 37 | if (path.includes("\0")) { |
| 38 | throw new Error(`ENOENT: path contains null byte, ${operation} '${path}'`); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | export function dirname(path: string): string { |
| 43 | const normalized = normalizePath(path); |
no outgoing calls
no test coverage detected