Rewritten in go and python

This commit is contained in:
2024-11-06 01:25:27 +04:00
parent 9f22d9678d
commit d8449237bb
50 changed files with 3824 additions and 879 deletions

16
server/pkg/utils/file.go Normal file
View File

@@ -0,0 +1,16 @@
package utils
import "os"
func MakeDirIfNotExist(path string) error {
return os.MkdirAll(path, os.ModePerm)
}
func IsDirExist(path string) (bool, error) {
if _, err := os.Stat(path); err == nil {
return true, nil
} else if !os.IsNotExist(err) {
return false, err
}
return false, nil
}