1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00
This commit is contained in:
2022-03-27 10:21:59 +08:00
parent 96d1d92ac7
commit 4dc4f7ad11
2 changed files with 56 additions and 0 deletions

19
fs/fs.go Normal file
View File

@ -0,0 +1,19 @@
package fs
import (
"os"
)
func IsExist(path string) bool {
_, err := os.Stat(path)
return err == nil
}
func IsDir(path string) bool {
file, err := os.Stat(path)
if err != nil {
return false
}
return file.IsDir()
}