mirror of
https://github.com/kopia/kopia.git
synced 2026-04-04 22:33:20 -04:00
* use `os.CreateTemp` in `tempfile.CreateAutoDelete` * refactor `TestTempFile`: add `VerifyTempfile` test helper * add test for `createUnixFallback` * rename function to `tempfile.CreateAutoDelete` * remove the `dir` parameter to `tempfile.CreateAutoDelete`, only an empty string was passed, apart from test cases. * guard against panic in TestShadowCopy
14 lines
284 B
Go
14 lines
284 B
Go
//go:build freebsd || darwin || openbsd
|
|
// +build freebsd darwin openbsd
|
|
|
|
package tempfile
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
// CreateAutoDelete creates a temporary file that does not need to be explicitly removed on close.
|
|
func CreateAutoDelete() (*os.File, error) {
|
|
return createUnixFallback()
|
|
}
|