System.IOUtils.TPath.GetLibraryPath
Delphi
class function GetLibraryPath: string; static;
C++
static System::UnicodeString __fastcall GetLibraryPath();
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TPath |
説明
アプリケーションが格納する必要のある、任意のデータを格納することのできるディレクトリへのパスを返します。これは、ファイル、キャッシュ、リソース、プレファレンスなど、ユーザーに関係ありません。
アプリケーションを実行しているシステムが要求されているフォルダをサポートしていない場合、または、要求されているフォルダがシステム上に存在しない場合、この関数は代わりに空の文字列を返します。
GetLibraryPath は多様なプラットフォーム上で、それぞれ次の場所を指しています:
- Windows では、実行可能ファイルを格納しているフォルダを指します。
- OS X および iOS では、ライブラリ ディレクトリを示します。
- Android では、アプリケーションのデバイス固有のサンドボックスの場所。iOS ホームの場所は、各アプリケーション インスタンスや各 iOS デバイスに対して、個別に定義されます。
プラットフォーム | サンプル パス | パス ID |
---|---|---|
Windows | C:\Program Files\<application folder> | |
OS X | /Users/<username>/Library | NSLibraryDirectory |
iOS デバイス | /var/mobile/Containers/Data/Application/<application ID>/Library | |
iOS シミュレータ | /Users/<username>/Library/Developer/CoreSimulator/Devices/<Device ID>/data/Containers/Data/Application/<application ID>/Library | |
Android | /data/app-lib/<application ID> | ApplicationInfo.nativeLibraryDir |