From 2c2ecaef99db137452ef6c2a72612d9738cca374 Mon Sep 17 00:00:00 2001 From: tslediter Date: Wed, 22 Nov 2023 16:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加安装程序 --- funcext/tvclib/utslvclauxiliary.tsf | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/funcext/tvclib/utslvclauxiliary.tsf b/funcext/tvclib/utslvclauxiliary.tsf index 7dcc9ba..28506b7 100644 --- a/funcext/tvclib/utslvclauxiliary.tsf +++ b/funcext/tvclib/utslvclauxiliary.tsf @@ -2315,9 +2315,9 @@ type tfileer_rwraw = class() // begin if (len=flen) and (tm=floadtime) then return 1; //Сʱû end - if 1 = readfile(rwraw(),fAlias,ffilename,p,len,data) then //ļ + if 1 = readfile(rwraw(),fAlias,ffilename,p,len,d) then //ļ begin - fdata := data; + fdata := d; flen := len; floadtime := tm; floaded := true; @@ -2325,6 +2325,12 @@ type tfileer_rwraw = class() // return 1; end end + function del();//ɾ + begin + if not(ifstring(ffilename) and ffilename) then return 0; + if fileexists(fAlias,ffilename) then return true; + return filedelete(fAlias,ffilename)<>1; + end function save(); // begin if not(ifstring(ffilename) and ffilename) then return 0; @@ -2336,12 +2342,16 @@ type tfileer_rwraw = class() // if sz>length(fdata) then begin if filedelete(fAlias,ffilename)<>1 then return 0; + if length(fdata)=0 then + begin + return true; + end end else begin p := 0; - if 1 = readfile(rwraw(),fAlias,ffilename,p,sz,data) then + if 1 = readfile(rwraw(),fAlias,ffilename,p,sz,d) then begin - if fdata=data then + if fdata=d then begin return 1; end