github.com/rhatdan/docker@v0.7.7-0.20180119204836-47a0dcbcd20a/pkg/ioutils/temp_windows.go (about) 1 package ioutils 2 3 import ( 4 "io/ioutil" 5 6 "github.com/docker/docker/pkg/longpath" 7 ) 8 9 // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format. 10 func TempDir(dir, prefix string) (string, error) { 11 tempDir, err := ioutil.TempDir(dir, prefix) 12 if err != nil { 13 return "", err 14 } 15 return longpath.AddPrefix(tempDir), nil 16 }