System.IOUtils.TPath.GetMusicPath
Delphi
class function GetMusicPath: string; static;
C++
static System::UnicodeString __fastcall GetMusicPath();
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 user music is stored.
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.
- Note: On Mac OS X, for Sand-box mode, to access this path you have to add com.apple.security.assets.music.read-only or com.apple.security.assets.music.read-write to the Entitlement List.
- On iOS Device, it returns an empty string as this directory is currently not supported.
- On iOS Simulator and Android, it points to a user-specific, application-specific directory.
Platform | Sample path | Path ID |
---|---|---|
Windows XP | C:\Documents and Settings\<username>\My Documents\My Music | CSIDL_MYMUSIC |
Windows Vista or later | C:\Users\<username>\Music | FOLDERID_Music |
Mac OS X | /Users/<username>/Music | NSMusicDirectory |
iOS Device | ||
iOS Simulator | /Users/<username>/Library/Developer/CoreSimulator/Devices/<Device ID>/data/Containers/Data/Application/<application ID>/Music | NSMusicDirectory |
Android | /storage/emulated/0/Android/data/<application ID>/files/Music |