MCPcopy
hub / github.com/docker/compose / NewDirAtRoot

Function NewDirAtRoot

pkg/watch/temp.go:35–47  ·  view source on GitHub ↗

NewDirAtRoot creates a new TempDir at the given root.

(root, prefix string)

Source from the content-addressed store, hash-verified

33
34// NewDirAtRoot creates a new TempDir at the given root.
35func NewDirAtRoot(root, prefix string) (*TempDir, error) {
36 tmpDir, err := os.MkdirTemp(root, prefix)
37 if err != nil {
38 return nil, err
39 }
40
41 realTmpDir, err := filepath.EvalSymlinks(tmpDir)
42 if err != nil {
43 return nil, err
44 }
45
46 return &TempDir{dir: realTmpDir}, nil
47}
48
49// NewDirAtSlashTmp creates a new TempDir at /tmp
50func NewDirAtSlashTmp(prefix string) (*TempDir, error) {

Callers 2

NewDirFunction · 0.85
NewDirAtSlashTmpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected