Files
pi-agent-integrated/pi-web/lib/session-path.ts
T

12 lines
333 B
TypeScript

import path from "node:path";
export function sessionPathKey(
filePath: string,
platform: NodeJS.Platform = process.platform,
): string {
const normalized = platform === "win32"
? path.win32.normalize(filePath)
: path.posix.normalize(filePath);
return platform === "win32" ? normalized.toLowerCase() : normalized;
}