MCPcopy
hub / github.com/eth0izzle/shhgit / GetTempDir

Function GetTempDir

core/util.go:12–22  ·  view source on GitHub ↗
(suffix string)

Source from the content-addressed store, hash-verified

10)
11
12func GetTempDir(suffix string) string {
13 dir := filepath.Join(*session.Options.TempDirectory, suffix)
14
15 if _, err := os.Stat(dir); os.IsNotExist(err) {
16 os.MkdirAll(dir, os.ModePerm)
17 } else {
18 os.RemoveAll(dir)
19 }
20
21 return dir
22}
23
24func PathExists(path string) bool {
25 _, err := os.Stat(path)

Callers 1

processRepositoryOrGistFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected