mirror of
https://github.com/containers/podman.git
synced 2025-09-17 06:47:10 +08:00
Vendor in latest upstream containers/image
Signed-off-by: umohnani8 <umohnani@redhat.com>
This commit is contained in:
19
vendor/github.com/containers/image/internal/tmpdir/tmpdir.go
generated
vendored
Normal file
19
vendor/github.com/containers/image/internal/tmpdir/tmpdir.go
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
package tmpdir
|
||||
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// TemporaryDirectoryForBigFiles returns a directory for temporary (big) files.
|
||||
// On non Windows systems it avoids the use of os.TempDir(), because the default temporary directory usually falls under /tmp
|
||||
// which on systemd based systems could be the unsuitable tmpfs filesystem.
|
||||
func TemporaryDirectoryForBigFiles() string {
|
||||
var temporaryDirectoryForBigFiles string
|
||||
if runtime.GOOS == "windows" {
|
||||
temporaryDirectoryForBigFiles = os.TempDir()
|
||||
} else {
|
||||
temporaryDirectoryForBigFiles = "/var/tmp"
|
||||
}
|
||||
return temporaryDirectoryForBigFiles
|
||||
}
|
Reference in New Issue
Block a user