GetUserDirectory()
Syntax
Result$ = GetUserDirectory(Type)Description
Returns the directory path of the specified directory type.
Parameters
Type The type of directory to get the path. It can be one of the following value: #PB_Directory_Desktop : desktop directory of the current logged user #PB_Directory_Downloads : downloads directory of the current logged user #PB_Directory_Documents : documents directory path of the current logged user #PB_Directory_Videos : videos directory path of the current logged user #PB_Directory_Musics : musics directory path of the current logged user #PB_Directory_Pictures : pictures directory path of the current logged user #PB_Directory_Public : public directory of the current logged user #PB_Directory_ProgramData: program data directory of the current logged user. On Linux and OSX, it is the home directory followed by '/.' to be able to create hidden config directory in the home user. #PB_Directory_AllUserData: common program data directory (accessible to all users) #PB_Directory_Programs : global program files path (can be read only)
Return value
Returns the full path of the specified directory. It will end with a directory separator ('\', #PS, #PS$ for Windows or '/', #NPS, #NPS$ otherwise). If the type is not found it will return an empty string.
Example
; List some of the user directories: Debug "#PB_Directory_Downloads = " + GetUserDirectory(#PB_Directory_Downloads) Debug "#PB_Directory_Documents = " + GetUserDirectory(#PB_Directory_Documents) Debug "#PB_Directory_Programs = " + GetUserDirectory(#PB_Directory_Programs)
See Also
GetCurrentDirectory(), GetHomeDirectory(), GetTemporaryDirectory()
Supported OS
All