dsh-better-chat/src/workspace-path.ts

5 lines
182 B
TypeScript

/** Absolute paths accepted by both POSIX and Windows hosts. */
export function isAbsoluteWorkspacePath(path: string): boolean {
return /^(?:\/|[A-Za-z]:[/\\]|\\\\)/.test(path);
}