MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / normalizePathForCompare

Function normalizePathForCompare

apps/desktop/main/utils/pathUtils.ts:25–29  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

23
24// 统一路径标准化(兼容 Windows 大小写差异)
25function normalizePathForCompare(input: string): string {
26 const resolved = path.resolve(input)
27 const normalized = path.normalize(resolved)
28 return process.platform === 'win32' ? normalized.toLowerCase() : normalized
29}
30
31/**
32 * 判断 child 是否为 parent 的子目录

Callers 2

isSubPathFunction · 0.70
isInsideAppInstallDirFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected