if System.SysUtils.FileExists(TPath.GetSharedDocumentsPath + '/update.txt') then begin try getstring := TStrings.Create; getstring.LoadFromFile(TPath.GetSharedDocumentsPath + '/update.txt'); oldbanben := getstring.Strings[0].ToInteger;
finally getstring.Free; end; //System.SysUtils.DeleteFile(TPath.GetSharedDocumentsPath + '/update.txt'); if newbanben>oldbanben then begin flag := true; ShowMessage('成功'); end else begin flag := False; ShowMessage('失败'); end; // ShowMessage('找到update.txt');
end else begin // flag := True; //没有找到update.txt文件,也升级 ShowMessage('没找到update.txt'); end; 显示“没找到update.txt”如果把TPath.GetSharedDocumentsPath改成TPath.GetDocumentsPath把错abstract error 请问如何才能显示“成功”
查看帮助中的功能之间的区别(同样可以用于:Windows XP及更高版本,iOS X和模拟器,Android)但请先阅读文本! ------- See the difference between to Function in Help (same that it can be used in: Windows XP and later, iOS X and simulator, Android) but read the text first!
---->>> LOOK AT Returns the path to the directory where documents shared between users are stored. 返回存储用户之间共享文档的目录的路径。
Note: In desktop applications, "shared" means "shared between different users". In mobile applications, "shared" means "shared between different applications".
Returns the path to the directory where user documents are stored. 返回存储用户文档的目录的路径。
If the system running your application does not support the requested folder, or if the requested folder does not exist in the system, this function returns an empty string instead.
如果运行应用程序的系统不支持所请求的文件夹,或者系统中不存在请求的文件夹,则此函数将返回空字符串。
Android ---> /data/data/<application ID>/files
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3