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判断操作系统是否win10

Delphi 让子窗体显示最大化

ttreeview的两个事件ondragdrop、ondragover 实现自动拖放功能

Delphi 写一个可拖动的 tshape

Delphi adoquery filter使用

Delphi 高亮选中memo某一行

Delphi shutdown() 关机

Delphi xe的firemonkey获取当前文件所在路径的方法

Delphi 命令行程序调用单元函数

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



打赏

取消

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

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

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

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

评论

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