System.IOUtils.TPath.GetLibraryPath

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function GetLibraryPath: string; static;

C++

static System::UnicodeString __fastcall GetLibraryPath();

Properties

Type Visibility Source Unit Parent
function public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils TPath

Description

Returns the path to a directory to store any data that your application needs store, regardless of the user, such as files, caches, resources, and preferences.

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.

GetLibraryPath points to the following locations on the various platforms:

  • On Windows, it points to the folder that contains the executable file.
  • On OS X and iOS, it points to the library directory.
  • On Android, it points to the device-specific location of the sandbox for the application; the iOS home location is individually defined for each application instance and for each iOS device.
Platform Sample path Path ID
Windows C:\Program Files\<application folder>
OS X /Users/<username>/Library NSLibraryDirectory
iOS Device /var/mobile/Containers/Data/Application/<application ID>/Library
iOS Simulator /Users/<username>/Library/Developer/CoreSimulator/Devices/<Device ID>/data/Containers/Data/Application/<application ID>/Library
Android /data/app-lib/<application ID> ApplicationInfo.nativeLibraryDir

See Also