Initial commit
This commit is contained in:
18
vendor/github.com/hyperhq/hypercli/pkg/ioutils/temp_windows.go
generated
vendored
Normal file
18
vendor/github.com/hyperhq/hypercli/pkg/ioutils/temp_windows.go
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// +build windows
|
||||
|
||||
package ioutils
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/hyperhq/hypercli/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
|
||||
}
|
||||
Reference in New Issue
Block a user