MCPcopy
hub / github.com/spicetify/cli / CheckExistAndCreate

Function CheckExistAndCreate

src/utils/utils.go:22–27  ·  view source on GitHub ↗

CheckExistAndCreate checks folder existence and makes that folder, recursively, if it does not exist

(dir string)

Source from the content-addressed store, hash-verified

20// CheckExistAndCreate checks folder existence
21// and makes that folder, recursively, if it does not exist
22func CheckExistAndCreate(dir string) {
23 _, err := os.Stat(dir)
24 if err != nil {
25 os.MkdirAll(dir, 0700)
26 }
27}
28
29// CheckExistAndDelete checks folder existence
30// and deletes that folder if it does exist

Callers 6

InitPathsFunction · 0.92
getExtractFolderFunction · 0.92
CopyFileFunction · 0.85
GetSpicetifyFolderFunction · 0.85
GetStateFolderFunction · 0.85
GetSubFolderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected