-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes copypaste error in file_put_contents documentation, documents system_is_tablet, system_is_chromebook and DIRECTORY_TEMP.
- Loading branch information
Showing
4 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
doc/src/references/builtin/Environment/Global Properties/system_is_chromebook.nvgt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
This property is true if the application is running on a Google Chromebook. | ||
const bool system_is_chromebook; | ||
*/ | ||
|
||
// example: | ||
void main() { | ||
if(system_is_chromebook) | ||
alert("example", "This application is running on a chromebook!"); | ||
else | ||
alert("example", "This application is not running on a chromebook."); | ||
} |
12 changes: 12 additions & 0 deletions
12
doc/src/references/builtin/Environment/Global Properties/system_is_tablet.nvgt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
This property is true if the application is running on any device that identifies itself as a tablet. | ||
const bool system_is_tablet; | ||
*/ | ||
|
||
// example: | ||
void main() { | ||
if(system_is_tablet) | ||
alert("example", "This application is running on a tablet!"); | ||
else | ||
alert("example", "This application is not running on a tablet."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
doc/src/references/builtin/Filesystem/Global Properties/DIRECTORY_TEMP.nvgt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
Property that returns the system's temporary directory, a place where short-term data can be stored. | ||
const string DIRECTORY_TEMP; | ||
## remarks: | ||
A slash character is already appended to the directory returned by this property. | ||
This function may return different values depending on the operating system the application is being run on. | ||
* On Windows, usually C:\Users\%username%\appdata\local\temp/. | ||
* on macOS and Linux systems, usually /tmp/. | ||
* on Android, the app's cache path. | ||
In any case the directory returned should be writable, though you should expect things you store there to be deleted by external factors at any time. | ||
*/ | ||
|
||
// example: | ||
void main() { | ||
alert("example", "a temporary file for the game could be stored at " + DIRECTORY_TEMP + "filename.txt"); | ||
} |