v1.0 beta init
This commit is contained in:
@ -77,4 +77,14 @@ func CopyFile(srcName, dstName string) (written int64, err error) {
|
||||
}
|
||||
defer dst.Close()
|
||||
return io.Copy(dst, src)
|
||||
}
|
||||
|
||||
func IsDirExists(path string) bool {
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return os.IsExist(err)
|
||||
}else{
|
||||
return fi.IsDir()
|
||||
}
|
||||
return false
|
||||
}
|
Reference in New Issue
Block a user