From: qydysky Date: Tue, 4 Aug 2020 01:28:47 +0000 (+0800) Subject: 34 X-Git-Tag: v0.0.2~53 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=eebecd310889580f6a733e6e2aa17b3299baf247;p=part%2F.git 34 --- diff --git a/CheckFile.go b/CheckFile.go index f66ea4e..7f03df9 100644 --- a/CheckFile.go +++ b/CheckFile.go @@ -11,7 +11,9 @@ import ( "io/ioutil" ) -type checkfile struct {} +type checkfile struct { + RV []interface{} +} func Checkfile() *checkfile{ return &checkfile{} @@ -47,16 +49,19 @@ func (this *checkfile) Build(checkFile,root,checkDir,SplitString string,usemd5 b } -func (this *checkfile) IsExist(f string) bool { +func (t *checkfile) IsExist(f string) bool { _, err := os.Stat(f) if err != nil { if os.IsNotExist(err) { + t.RV = append(t.RV,false,nil) return false }else{ Logf().E(err) + t.RV = append(t.RV,false,err) return false } } + t.RV = append(t.RV,true,nil) return true }