使用Delphi XE5在Android和iOS中获取SD卡和可执行文件路径

Yor*_*iev 3 delphi delphi-xe5

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

Ken*_*ite 7

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

uses
  IOUtils;


var
  AppPath, CardPath: string;


  AppPath := TPath.GetHomePath;
  CardPath :- TPath.GetDocumentsPath;
Run Code Online (Sandbox Code Playgroud)

还有其他一些与系统路径相关的功能TPath,包括这些(以及许多其他功能 - 你必须看到哪些适用于Android和iOS,因为文档不清楚)

GetTempPath
GetPublicPath
GetCameraPath
GetMusicPath
GetDownloadsPath    
Run Code Online (Sandbox Code Playgroud)