- 如何在Delphi XE5中获取Android和iOS的SD卡路径以及可执行文件路径呢?
System.IoUtils.TPath
。使用 TPath.GetDocumentsPath
获取SD卡路径,使用 TPath.GetHomePath
找到应用程序的基目录。uses
IOUtils;
var
AppPath, CardPath: string;
AppPath := TPath.GetHomePath;
CardPath :- TPath.GetDocumentsPath;
TPath
中还有几个与系统路径相关的函数,包括以下内容(以及许多其他内容 - 您需要查看哪些适用于Android和iOS,因为文档不清楚)
GetTempPath
GetPublicPath
GetCameraPath
GetMusicPath
GetDownloadsPath