MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / joinWin32

Function joinWin32

daemon/src/tools/filepath.ts:36–49  ·  view source on GitHub ↗
(...paths: string[])

Source from the content-addressed store, hash-verified

34}
35
36function joinWin32(...paths: string[]): string {
37 if (!paths.length) return ".";
38 if (paths.length == 1) return paths[0];
39 const parts = path.win32.parse(paths[1]);
40 let p: string;
41 if (parts.root) {
42 p = paths[1];
43 } else {
44 p = path.normalize(path.join(paths[0], paths[1]));
45 }
46 if (paths.length <= 2) return p;
47
48 return joinWin32(p, ...paths.slice(2));
49}

Callers 1

normalizedJoinFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected