System.IOUtils.TPath.GetCachePath
Delphi
class function GetCachePath: string; static;
C++
static System::UnicodeString __fastcall GetCachePath();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TPath |
Description
Returns the path to the directory where your application can store cache files.
If the system running your application does not support the requested folder, or if the requested folder does not exist in the system, this function returns an empty string instead.
- On Windows and Mac OS X, it points to a user-specific, application-agnostic directory.
- On iOS and Android, it points to an application-specific, user-specific directory.
Platform | Sample path | Path ID |
---|---|---|
Windows XP | C:\Documents and Settings\<username>\Local Settings\Application Data | CSIDL_LOCAL_APPDATA |
Windows Vista or later | C:\Users\<username>\AppData\Local | FOLDERID_LocalAppData |
Mac OS X | /Users/<username>/Library/Caches | NSCachesDirectory |
iOS Device | /var/mobile/Containers/Data/Application/<application ID>/Library/Caches | |
iOS Simulator | /Users/<username>/Library/Developer/CoreSimulator/Devices/<Device ID>/data/Containers/Data/Application/<application ID>/Library/Caches | |
Android | /data/data/<application ID>/cache | Context.getCacheDir |