@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
13 lines • 890 B
TypeScript
/** How a platform compares paths: darwin and win32 fold case; win32 also treats `/` and `\` alike. */
export type PathPlatform = "posix" | "darwin" | "win32";
export declare function currentPathPlatform(): PathPlatform;
export declare function pathSegments(path: string, platform: PathPlatform): string[];
export declare function sameSegment(a: string, b: string, platform: PathPlatform): boolean;
export interface MovedPrefixMatch {
readonly prefix: readonly string[];
/** `path`'s segments below `root`, in the spelling `path` used. */
readonly remainder: readonly string[];
}
/** The listed prefix `path` lies under (on a segment boundary) relative to `root`, if any. */
export declare function matchMovedPrefix(path: string, root: string, moved: readonly (readonly string[])[], platform: PathPlatform): MovedPrefixMatch | undefined;
//# sourceMappingURL=path-match.d.ts.map