pkg/ioutils/temp_windows.go
Vincent Batts 9a67c61b15
*: import paths and a README
This will make the packaages/components individually more consumable

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-04-18 14:58:56 -04:00

18 lines
378 B
Go

// +build windows
package ioutils
import (
"io/ioutil"
"github.com/containers/pkg/longpath"
)
// TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format.
func TempDir(dir, prefix string) (string, error) {
tempDir, err := ioutil.TempDir(dir, prefix)
if err != nil {
return "", err
}
return longpath.AddPrefix(tempDir), nil
}