(suffix string)
| 10 | ) |
| 11 | |
| 12 | func 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 | |
| 24 | func PathExists(path string) bool { |
| 25 | _, err := os.Stat(path) |
no outgoing calls
no test coverage detected