MCPcopy Create free account
hub / github.com/imroc/req / CreateDirectory

Function CreateDirectory

internal/util/util.go:98–107  ·  view source on GitHub ↗

CreateDirectory create the directory.

(dir string)

Source from the content-addressed store, hash-verified

96
97// CreateDirectory create the directory.
98func CreateDirectory(dir string) (err error) {
99 if _, err = os.Stat(dir); err != nil {
100 if os.IsNotExist(err) {
101 if err = os.MkdirAll(dir, 0755); err != nil {
102 return
103 }
104 }
105 }
106 return
107}

Callers 2

handleDownloadFunction · 0.92
TestCreateDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCreateDirectoryFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…