System.IOUtils.TPath.GetDocumentsPath

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

class function GetDocumentsPath: string; static;

C++

static System::UnicodeString __fastcall GetDocumentsPath();

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 documents are 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.
  • On iOS and Android, it points to an application-specific, user-agnostic directory.
Platform Sample path Path ID
Windows XP C:\Documents and Settings\<username>\My Documents CSIDL_MYDOCUMENTS
CSIDL_PERSONAL
Windows Vista or later C:\Users\<username>\Documents FOLDERID_Documents
Mac OS X /Users/<username>/Documents NSDocumentDirectory
iOS Device /var/mobile/Containers/Data/Application/<application ID>/Documents
iOS Simulator /Users/<username>/Library/Developer/CoreSimulator/Devices/<Device ID>/data/Containers/Data/Application/<application ID>/Documents
Android /data/data/<application ID>/files Context.getFilesDir

See Also