Name
hw_GetSystemPath -- get path to a system directory (V7.1)
Synopsis
int ok = hw_GetSystemPath(int type, STRPTR buf, int len, struct hwTagList
             *tags);
Function
This function can be used to obtain the path to a standard directory on the current host system. You have to pass a constant specifying which system directory you want to obtain in type. A fully qualified path to this directory will then be copied to the buffer passed in buf.

The following directories are currently recognized by the type argument:

HWSYSPATH_PROGRAMNAME
Path to the program that is executing this function.

HWSYSPATH_WINDOWS
Path to the Windows directory on this computer. Supported only on Windows.

HWSYSPATH_PROGRAMFILES
Path to the program files directory on this computer. Supported on Windows and macOS.

HWSYSPATH_APPDATA
Path to the application data folder for the current user on this computer. Supported on Windows, macOS, and iOS.

HWSYSPATH_COMMONAPPDATA
Path to the application data folder for all users on this computer. Supported on Windows and macOS.

HWSYSPATH_MYDOCUMENTS
Path to the "My documents" folder on this computer. Supported on Windows, macOS, and iOS.

HWSYSPATH_USERHOME
Path to the user's home directory. Supported on Windows, macOS, and Linux.

HWSYSPATH_USERNAME
Not really a path but returns the name of the current user. Supported on Windows, macOS, and Linux.

HWSYSPATH_SDCARD
Path to the SD card on this device. Supported only on Android.

HWSYSPATH_EXTERNALSTORAGE
Path to the external storage folder on this device. Supported only on Android.

HWSYSPATH_INTERNALSTORAGE
Path to the internal storage folder on this device. Supported only on Android.

HWSYSPATH_APPBUNDLE
Path to the application bundle of the current program. Supported only on macOS and iOS.

HWSYSPATH_PREFERENCES
The path that Hollywood uses to store preferences managed using Hollywood's SavePrefs() and LoadPrefs() functions.

HWSYSPATH_TEMPFILES
A path that you can write temporary files to.

HWSYSPATH_LOCALAPPDATA
Path to the local, non-roaming application data folder for the current user on this computer. Supported on Windows and macOS. On macOS this will be the same as HWSYSPATH_COMMONAPPDATA. (V9.0)

HWSYSPATH_STARTPATH:
Returns the path that was the current directory when Hollywood was started. (V9.0)

Designer compatibility
Unsupported

Inputs
type
common path to obtain (see above for supported paths)
buf
memory buffer to write path to
len
size of memory buffer in bytes
tags
reserved for future use; set it to NULL for now
Results
ok
True for success, False if there was an error

Show TOC