steam_file_share

Force the Steam API to synchronise the given file with the Steam Cloud.

Syntax:

steam_file_share(filename);


Argument Description
filename The name of the file synchronise.


Returns: Real


Description

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.


Example:

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.


Back: Steam API
Next: steam_file_delete
© Copyright YoYo Games Ltd. 2018 All Rights Reserved