2 Star 15 Fork 10

北京小程科技有限公司/Go通用工具

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
stat.go 387 Bytes
一键复制 编辑 原始数据 按行查看 历史
shallot 提交于 2019-07-14 13:20 +08:00 . 添加SQLCommon接口
package filesystem
import (
"os"
)
// 判断是否是文件
func IsFile(path string) (isFile bool, err error) {
fileInfo, err := os.Stat(path)
if err != nil {
return
}
isFile = !fileInfo.IsDir()
return
}
// 判断是否是目录
func IsDir(path string) (isDir bool, err error) {
fileInfo, err := os.Stat(path)
if err != nil {
return
}
isDir = fileInfo.IsDir()
return
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/xiaochengtech/common.git
git@gitee.com:xiaochengtech/common.git
xiaochengtech
common
Go通用工具
82269be32710

搜索帮助