MCPcopy
hub / github.com/eddycjy/go-gin-example / IsNotExistMkDir

Function IsNotExistMkDir

pkg/file/file.go:38–46  ·  view source on GitHub ↗

IsNotExistMkDir create a directory if it does not exist

(src string)

Source from the content-addressed store, hash-verified

36
37// IsNotExistMkDir create a directory if it does not exist
38func IsNotExistMkDir(src string) error {
39 if notExist := CheckNotExist(src); notExist == true {
40 if err := MkDir(src); err != nil {
41 return err
42 }
43 }
44
45 return nil
46}
47
48// MkDir create a directory
49func MkDir(src string) error {

Callers 3

ExportMethod · 0.92
CheckImageFunction · 0.92
MustOpenFunction · 0.85

Calls 2

CheckNotExistFunction · 0.85
MkDirFunction · 0.85

Tested by

no test coverage detected