提交 88c63d23 编写于 作者: 李光春

增加文件/文件夹函数

上级 60194282
## v1.0.15 / 2021-06-07
## v1.0.16 / 2021-06-07
- 增加文件/文件夹函数
......
......@@ -63,10 +63,10 @@ func CreateFile(fileName string) (bool, error) {
}
// CreateFiles 创建文件夹
func CreateFiles(path string) (bool, error) {
err := os.Mkdir(path, os.ModePerm)
func CreateFiles(path string, perm int) (bool, error) {
err := os.MkdirAll(path, os.FileMode(perm))
if err != nil {
return false, nil
return false, err
} else {
return true, nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册