问题
- How do I get the SD card path and how do I get the executable path in Android and iOS using Delphi XE5?
回答1:
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
IOUtils;
var
AppPath, CardPath: string;
AppPath := TPath.GetHomePath;
CardPath :- TPath.GetDocumentsPath;
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
来源:https://stackoverflow.com/questions/18850034/get-sd-card-and-executable-path-in-android-and-ios-with-delphi-xe5