system.directory

Syntax

sret := system.directory(<s><,scustom>)

Set and retrieve the current system directory.

If the function is called with no arguments, returns the current system directory.

If called with one argument, the function first looks for a keyword match with the following special cases:

input
Set the current directory to be the same as the currently processing data file (if any).
engine
Set the current directory to be the same and the directory of the main engine module (dll).
executable
Set the current directory to the location of the executable file for the code.
project
Set the current directory to the location of the current project file (if any).
custom
Set the current directory to the contents of the second string provided in scustom.

If s does not match any of the above options, it is assumed to be a new directory name and is processed immediately.

If not successful, an error will occur.

The return value is the absolute path of the current directory before the change.

Returns:

sret - the current directory before processing the function.

Arguments:

s - String specifying which directory to use

scustom - Specific directory to use when the custom option is chosen in the first argument.