Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiFiremonkeyIOSOSXWindows

Get System Directories Using TPath In Delphi XE5 Firemonkey On Android And IOS

Delphi XE5 Firemonkey Documents PathEmbarcadero has a page up which shows a map of all of the TPath functions in Delphi XE5 Firemonkey and what they resolve to on each platform. It also details which path functions resolve on Android, IOS, Windows, and OSX. The most useful path is probably going to be TPath.GetDocumentsPath and most of the time that is probably the path you want to use to store files for your app in. TPath is located in System.IOUtils so you will need to include that in your uses clause to be able to use TPath. There are some other useful paths defined especially for specific types of applications like there is a TPath.GetCachePath function which could be a place to store any cache files that you use in your app. TPath.GetCameraPath, TPath.GetMusicPath, and TPath.GetDownloadsPath also look useful but only on Android (they don’t resolve to anything on IOS according to the page. Also check out this demo app from Embarcadero where they demonstrate deploying a file and then loading it from TPath.GetDocumentsPath.

Head over to Embarcadero’s page to get the full cross platform system directories path function map.

close

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

DelphiIDEShowcaseWindows

Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores

DelphiFiremonkeyIDEIOSOSXWindows

DelphiCon 2020 FireMonkey Sessions Available Starting November 19

AndroidC++BuilderDelphiDemoFiremonkeyWindows

Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

Sign up for our Newsletter and
stay informed

4 Comments

Leave a Reply to Lionel Cancel reply