feat: add gen enum command
This commit is contained in:
23
pkg/utils/fs.go
Normal file
23
pkg/utils/fs.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func IsDir(dir string) bool {
|
||||
f, err := os.Stat(dir)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return f.IsDir()
|
||||
}
|
||||
|
||||
func IsFile(path string) bool {
|
||||
f, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return f.Mode().IsRegular()
|
||||
}
|
||||
Reference in New Issue
Block a user