(segment: string, label: string)
| 7 | } from './workspaceRuntime' |
| 8 | |
| 9 | function validatePathSegment(segment: string, label: string): string { |
| 10 | if (!segment || segment === '.' || segment === '..' || /[\\/]/.test(segment)) { |
| 11 | throw new Error(`Invalid ${label}`) |
| 12 | } |
| 13 | |
| 14 | return segment |
| 15 | } |
| 16 | |
| 17 | async function pathExists(targetPath: string): Promise<boolean> { |
| 18 | try { |
no outgoing calls
no test coverage detected