ES3Cloud.RenameFile
Description
Renames a file on the server for the given user, or renames a global filename if no user is specified.
Parameters
oldFilePath | The relative or absolute path of the file we want to rename. |
newFilePath | The relative or absolute path we want to rename the file to. |
user |
[Optional] The name of the user this file belongs to, if we don't want the file to be global. |
password |
[Optional] The password of the user this file belongs to. |
settings |
[Optional] The settings we want to use to override the default settings. |
Examples
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// Create a new ES3Cloud object with the URL to our ES3.php file. var cloud = new ES3Cloud("https://www.myserver.com/ES3Cloud.php", "myAPIKey"); // Rename a file for a particular user. yield return StartCoroutine(cloud.RenameFile("myOldFile.es3", "myNewFile.es3" "myUser", "myUsersPassword")); if(cloud.isError) Debug.LogError(cloud.error); // Rename a global file. yield return StartCoroutine(cloud.RenameFile("myOldFile.es3", "myNewFile.es3")); if(cloud.isError) Debug.LogError(cloud.error); |