MCPcopy Index your code
hub / github.com/devspace-sh/devspace / getParentDir

Function getParentDir

pkg/devspace/sync/util_test.go:24–36  ·  view source on GitHub ↗
(localDir string, remoteDir string, outsideDir string, editLocation int)

Source from the content-addressed store, hash-verified

22)
23
24func getParentDir(localDir string, remoteDir string, outsideDir string, editLocation int) (string, error) {
25 if editLocation == editInLocal {
26 return localDir, nil
27 } else if editLocation == editInRemote {
28 return remoteDir, nil
29 } else if editLocation == editOutside {
30 return outsideDir, nil
31 } else if editLocation == editSymLinkDir {
32 return filepath.Join(outsideDir, "symlinkTargets"), nil
33 }
34
35 return "", errors.New("CreateLocation " + strconv.Itoa(editLocation) + " unknown")
36}
37
38type checkedFileOrFolder struct {
39 path string

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected