Ai
3 Star 0 Fork 0

salmon_go/common

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
folder.go 325 Bytes
一键复制 编辑 原始数据 按行查看 历史
MikeJia 提交于 2021-03-03 21:08 +08:00 . init
package file
import "os"
//PathExist 判断文件或文件夹是否存在
func PathExist(path string) bool {
_, err := os.Stat(path)
return err == nil || os.IsExist(err)
}
//FolderCreate 创建文件夹
func FolderCreate(path string) (err error) {
if !PathExist(path) {
err = os.Mkdir(path, os.ModePerm)
}
return
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/salmon-go/common.git
git@gitee.com:salmon-go/common.git
salmon-go
common
common
v0.0.6

搜索帮助