MCPcopy Create free account
hub / github.com/ddev/ddev / WindowsPathToCygwinPath

Function WindowsPathToCygwinPath

pkg/util/utils.go:425–432  ·  view source on GitHub ↗

WindowsPathToCygwinPath changes C:/path/to/something to //c/path/to/something This should only be used in CYGWIN/git-bash context Sadly, if we have a Windows drive name, it has to be converted from C:/ to //c for Win10Home/Docker toolbox

(windowsPath string)

Source from the content-addressed store, hash-verified

423// This should only be used in CYGWIN/git-bash context
424// Sadly, if we have a Windows drive name, it has to be converted from C:/ to //c for Win10Home/Docker toolbox
425func WindowsPathToCygwinPath(windowsPath string) string {
426 windowsPath = filepath.ToSlash(windowsPath)
427 if len(windowsPath) >= 2 && string(windowsPath[1]) == ":" {
428 drive := strings.ToLower(string(windowsPath[0]))
429 windowsPath = "/" + drive + windowsPath[2:]
430 }
431 return windowsPath
432}
433
434// Chmod changes the file permissions of the named path,
435// if the path already has the necessary permissions, do nothing.

Callers 8

TestLocalfilePullFunction · 0.92
DockerEnvMethod · 0.92
GetVersionInfoFunction · 0.92
FileHashFunction · 0.92
TestFileHashFunction · 0.92
TestCmdExecFunction · 0.92
debug-test.goFile · 0.92

Calls

no outgoing calls

Tested by 3

TestLocalfilePullFunction · 0.74
TestFileHashFunction · 0.74
TestCmdExecFunction · 0.74