Name
GetSystemInfo -- get OS-specific information (V4.5)
Synopsis
t = GetSystemInfo()
Function
This function can be used to query certain information from the operating system that Hollywood is currently running on. GetSystemInfo() returns a table that contains several fields which are different depending on the operating system Hollywood is currently running on.

The following fields will be initialized in the return table:

UserHome:
Path to the user's home directory. Supported on Windows, macOS, and Linux. (V5.3)

UserName:
Name of the current user. Supported on Windows, macOS, and Linux. (V5.3)

ProgramFiles:
Path to the program files directory on this computer. Supported on Windows since V4.5 and on macOS since V5.3.

AppData:
Path to the application data folder for the current user on this computer. Supported on Windows since V4.5, on macOS since V5.3, and on iOS since V7.0.

CommonAppData:
Path to the application data folder for all users on this computer. Supported on Windows and macOS. (V6.1)

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 set to the same path as CommonAppData. (V9.0)

MyDocuments:
Path to the "My documents" folder on this computer. Supported on Windows since V4.5, on macOS since V5.3, and on iOS since V7.0.

Windows:
Path to the Windows directory on this computer. Supported only on Windows. (V4.5)

SDCard:
Path to the external storage device. This is called SDCard for legacy reasons because in the early days of Android, the external storage device typically was an SD card. This tag is only supported on Android. Also note that starting from Android 6.0, apps are no longer allowed to read from and write to this folder without explicit user permission. When using the Hollywood Player, it will automatically request such permission from the user on startup. When compiling stand-alone APKs using the Hollywood APK Compiler, though, you have to manually request read and/or write permission for this folder by using the PermissionRequest() function. See PermissionRequest for details. (V5.1)

ExternalStorage:
Path to the external storage folder on this device. Supported only on Android. (V5.1)

InternalStorage:
Path to the internal storage folder on this device. Supported only on Android. (V5.1)

AppBundle:
Path to the application bundle of the current program. Supported only on macOS (V6.1) and iOS (V7.0).

Preferences:
The path that Hollywood uses to store preferences managed using SavePrefs(). (V7.1)

TempFiles:
A path that you can write temporary files to. (V7.1)

Inputs
none

Results
t
a table containing the fields described above

Show TOC