temp_directory

Temporary directory created for the game.

Syntax:

temp_directory


Returns: String.


Description

This can be used to return the temporary directory created for your game each time it is run (the root does not contain the final "\"). This directory will hold files and can be accessed while the game is running, but it will be removed (along with all files that it contains) when the game is closed.


WARNING! This function may not work as you expect due to GameMaker: Studio being sandboxed! Please see the section on File System Limits for more information.


Example:

ini_open(temp_directory + "\temp_ini.ini");

This will open an ini file in the temporary directory of the game (creating it if it does not already exist).


Back: File Handling
Next: working_directory
© Copyright YoYo Games Ltd. 2018 All Rights Reserved