MCPcopy
hub / github.com/perkeep/perkeep / camliVarDirOf

Function camliVarDirOf

internal/osutil/paths.go:132–144  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

130}
131
132func camliVarDirOf(name string) string {
133 if d := os.Getenv("CAMLI_VAR_DIR"); d != "" {
134 return d
135 }
136 failInTests()
137 switch runtime.GOOS {
138 case "windows":
139 return filepath.Join(os.Getenv("APPDATA"), upperFirst(name))
140 case "darwin":
141 return filepath.Join(HomeDir(), "Library", upperFirst(name))
142 }
143 return filepath.Join(HomeDir(), "var", name)
144}
145
146func CamliBlobRoot() (string, error) {
147 varDir, err := CamliVarDir()

Callers 1

CamliVarDirFunction · 0.85

Calls 3

failInTestsFunction · 0.85
upperFirstFunction · 0.85
HomeDirFunction · 0.85

Tested by

no test coverage detected