在Android和iOS中使用Delphi XE5获取SD卡和可执行路径 [英] Get SD card and executable path in Android and iOS with Delphi XE5

查看:510
本文介绍了在Android和iOS中使用Delphi XE5获取SD卡和可执行路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 如何获取SD卡路径,如何在Android和iOS中使用Delphi XE5获取可执行路径?

推荐答案

使用 System.IoUtils.TPath 。 SD卡路径是通过使用 TPath.GetDocumentsPath 获得的,应用程序的基本目录应该位于 TPath.GetHomePath

Use System.IoUtils.TPath. The SD card path is obtained by using TPath.GetDocumentsPath, and the base directory of the app should be found with TPath.GetHomePath.

uses
  SysUtils;


var
  AppPath, CardPath: string;


  AppPath := TPath.GetHomePath;
  CardPath :- TPath.GetDocumentsPath;

TPath 还包括这些(和许多其他 - 你必须看到适用于Android和iOS,文档不清楚)

There are several other system path related functions in TPath as well, including these (and many others - you'll have to see which apply to Android and iOS, as the docs aren't clear)

GetTempPath
GetPublicPath
GetCameraPath
GetMusicPath
GetDownloadsPath    

这篇关于在Android和iOS中使用Delphi XE5获取SD卡和可执行路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆