ArcBasicDocs

SystemProperty

Returns a system property.

SystemProperty ( property$ )

Parameters

property$
the name of the information wanted; capitals don't matter.

Description

Gives back a piece of information about the computer or the program, chosen by name, or an empty string for a name it doesn't know. The names are: "os" gives the operating system: Windows, macOS, Linux or Android. "tempdir" gives a folder for temporary files. "appdir" gives the folder the program is running in. "savedir" gives the folder where the program's own files go, which in a finished game is the player's data folder. Folder names end with a slash, ready to have a file name added.

In ArcBasic

ArcBasic adds SystemProperty("savedir"): the folder where the program's own files go, ending in a slash. When you run the program from the editor it is the program's current folder. In a game made with Create Executable it is the player's data folder for the game (~/Library/Application Support/ArcBasic Games/<game> on a Mac, %APPDATA%\ArcBasic Games\<game> on Windows), where WriteFile puts its files.

See also