Vincent Batts
9a67c61b15
This will make the packaages/components individually more consumable Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
18 lines
378 B
Go
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
|
|
}
|