From eebecd310889580f6a733e6e2aa17b3299baf247 Mon Sep 17 00:00:00 2001 From: qydysky Date: Tue, 4 Aug 2020 09:28:47 +0800 Subject: [PATCH] 34 --- CheckFile.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 } -- 2.39.2