MCPcopy Index your code
hub / github.com/LeetCode-OpenSource/vscode-leetcode / toWinPath

Function toWinPath

src/utils/wslUtils.ts:17–22  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

15}
16
17export async function toWinPath(path: string): Promise<string> {
18 if (path.startsWith("\\mnt\\")) {
19 return (await executeCommand("wsl", ["wslpath", "-w", `"${path.replace(/\\/g, "/").substr(0, 6)}"`])).trim() + path.substr(7);
20 }
21 return (await executeCommand("wsl", ["wslpath", "-w", "/"])).trim() + path;
22}

Callers

nothing calls this directly

Calls 1

executeCommandFunction · 0.90

Tested by

no test coverage detected