mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
6ed1163c98
Files that are suffixed with `_linux.go` or `_windows.go` are already only built on Linux / Windows, so these build-tags were redundant. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
16 lines
362 B
Go
16 lines
362 B
Go
package 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
|
|
}
|