steam_file_share(filename);
Argument | Description |
---|---|
filename | The name of the file synchronise. |
Returns: Real
With this function you can force your game to synchronise the
given file with the Steam Cloud. This is not normally necessary due
to the fact that the game will synchronise automatically at the end
of the player's session, nor is it recommended by Steam, but it can
be useful to ensure sensitive information is synchronised
immediately. The function will return a value of 0 if it fails for
whatever reason and a value greater than 0 if it succeeds.
if !steam_file_persisted("Save.txt")
{
steam_file_share("Save.txt");
}
The above code will check to see if a file has been stored to the Steam Cloud, and if it has not it will then synchronise it.