These functions inspect the host platform or resolve paths through the same host path rules used by Expr file operations.
Returns the current profile path.
The profile path is the main machine configuration folder. It is the folder where the settings file is stored.
| Argument | Type | Description |
|---|---|---|
| none | No arguments. |
Returns: string.
Example:
profilePath = path();
Resolves a path through the host path rules.
| Argument | Type | Description |
|---|---|---|
| `relativePath` | any | Path text to resolve. |
Returns: string.
Resolution rules:
Examples:
profilePath = path(); sourcePath = path(""); sourceFile = path("~"); profileFile = path("./MyFile.txt"); sourceFile2 = path("MyFile.txt"); sourceFile3 = path("~/MyFile.txt"); sourceParentFile = path("~/../MyFile.txt"); noSourceFile = path("~"); // empty string when no source file is available
Returns a string identifying the platform.
| Argument | Type | Description |
|---|---|---|
| none | No arguments. |
Returns: string: `windows`, `linux`, `apple`, `arm`, or `unknown`.
Example:
if(platform() == 'windows') { print('Running on Windows'); };
Previous: Dialog Functions
Next: Methods and properties