MCPcopy
hub / github.com/codedogQBY/ReadAny / isAbsoluteOrProtocolPath

Function isAbsoluteOrProtocolPath

packages/core/src/sync/sync-files.ts:52–59  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

50}
51
52function isAbsoluteOrProtocolPath(path: string): boolean {
53 return (
54 path.startsWith("/") ||
55 /^[A-Za-z]:[\\/]/.test(path) ||
56 path.startsWith("\\\\") ||
57 /^[A-Za-z][A-Za-z0-9+.-]*:\/\//.test(path)
58 );
59}
60
61function getDirName(path: string): string {
62 const separatorIndex = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));

Callers 3

syncFilesFunction · 0.85
cleanupLocalOrphansFunction · 0.85
downloadBookFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected