This commit is contained in:
2023-08-24 21:23:55 +08:00
parent 8ac572b215
commit 486f1163e8
8 changed files with 266 additions and 77 deletions

View File

@@ -313,7 +313,7 @@ func CreateDir(folderName string, path string) string {
folderPath := filepath.Join(path, folderName)
if _, err := os.Stat(folderPath); os.IsNotExist(err) {
// 必须分成两步:先创建文件夹、再修改权限
os.Mkdir(folderPath, 0664) //0644也可以os.ModePerm
os.MkdirAll(folderPath, 0664) //0644也可以os.ModePerm
os.Chmod(folderPath, 0664)
}
return folderPath