Delphi FMX GetAppPath 获取APP路径


本文整理自网络,侵删。

 
uses
  Androidapi.JNIBridge,
  Androidapi.IOUtils,

function GetAppPath: string;
begin
{$IF Defined(ANDROID)}
  Result := ExtractFilePath(
    ExcludeTrailingPathDelimiter(
    System.IOUtils.TPath.GetHomePath));
{$ELSE}
  Result := ExtractFilePath(ParamStr(0));
{$ENDIF ANDROID}
  Result := IncludeTrailingPathDelimiter(Result);
end;



 Memo1.Lines.Add( GetAppPath);  //结果:/data/user/0/com.embarcadero.HeaderFooterApplication/
 Memo1.Lines.Add( TPath.GetHomePath);  //结果:/data/user/0/com.embarcadero.HeaderFooterApplication/files

相关阅读 >>

Delphi获取默认浏览器

Delphi 自带大小写转换

Delphi获取系统进程和路径

Delphi 把文件锁定到任务栏

Delphi adoquery 开启本地缓存

Delphi 之 编辑框控件(tedit)

Delphi dll 字符串传递例子

Delphi 得到字符串拼音首字母

Delphi 统计中英文字个数的例子

Delphi打印各类文档

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...