mirror of
https://github.com/kopia/kopia.git
synced 2026-02-23 10:04:41 -05:00
14 lines
277 B
Go
14 lines
277 B
Go
// Package tempfile provides a cross-platform abstraction for creating private
|
|
// read-write temporary files which are automatically deleted when closed.
|
|
package tempfile
|
|
|
|
import "os"
|
|
|
|
func tempDirOr(dir string) string {
|
|
if dir != "" {
|
|
return dir
|
|
}
|
|
|
|
return os.TempDir()
|
|
}
|