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