Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get SD card and executable path in Android and iOS with Delphi XE5 [closed]

  • How do I get the SD card path and how do I get the executable path in Android and iOS using Delphi XE5?
like image 524
Yordan Yanakiev Avatar asked Nov 30 '25 14:11

Yordan Yanakiev


1 Answers

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    
like image 78
Ken White Avatar answered Dec 04 '25 21:12

Ken White



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!