mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-12 06:11:03 -04:00
17 lines
411 B
Go
17 lines
411 B
Go
![]() |
package ioutils // import "github.com/docker/docker/pkg/ioutils"
|
||
|
|
||
|
import (
|
||
|
"io/ioutil"
|
||
|
|
||
|
"github.com/docker/docker/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
|
||
|
}
|