🎨 判断目录
This commit is contained in:
parent
879b3d78c3
commit
17e59cf55a
|
@ -76,6 +76,10 @@ func (*myfile) IsImg(extension string) bool {
|
||||||
// IsDir determines whether the specified path is a directory.
|
// IsDir determines whether the specified path is a directory.
|
||||||
func (*myfile) IsDir(path string) bool {
|
func (*myfile) IsDir(path string) bool {
|
||||||
fio, err := os.Lstat(path)
|
fio, err := os.Lstat(path)
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
if nil != err {
|
if nil != err {
|
||||||
fileLogger.Warnf("Determines whether [%s] is a directory failed: [%v]", path, err)
|
fileLogger.Warnf("Determines whether [%s] is a directory failed: [%v]", path, err)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue