fehlerbehebung
This commit is contained in:
parent
024214120f
commit
63212b9e89
21
file.go
21
file.go
|
@ -40,24 +40,3 @@ func fileCreate(filepath string) {
|
|||
logger("fileCreate : unknown -> " + filepath)
|
||||
}
|
||||
}
|
||||
|
||||
func fileCreateDir(dirpath string) {
|
||||
if _, err := os.Stat(dirpath); err == nil {
|
||||
err := os.Mkdir(dirpath, 0755)
|
||||
errorPanic(err)
|
||||
logger("fileCreateDir : folder created -> " + dirpath)
|
||||
} else if errors.Is(err, os.ErrNotExist) {
|
||||
logger("fileCreateDir : folder not created -> " + dirpath)
|
||||
} else {
|
||||
logger("fileCreateDir : unknown -> " + dirpath)
|
||||
}
|
||||
}
|
||||
|
||||
func fileExist(filepath string) bool {
|
||||
if _, err := os.Stat(filepath); err == nil {
|
||||
return true
|
||||
} else if errors.Is(err, os.ErrNotExist) {
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue