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

Function CheckExistAndDelete

src/utils/utils.go:31–36  ·  view source on GitHub ↗

CheckExistAndDelete checks folder existence and deletes that folder if it does exist

(dir string)

Source from the content-addressed store, hash-verified

29// CheckExistAndDelete checks folder existence
30// and deletes that folder if it does exist
31func CheckExistAndDelete(dir string) {
32 _, err := os.Stat(dir)
33 if err == nil {
34 os.RemoveAll(dir)
35 }
36}
37
38// Unzip unzips zip
39func Unzip(src, dest string) error {

Callers 4

RefreshThemeFunction · 0.92
InitSettingFunction · 0.92
UpdateFunction · 0.92
CreateJunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected