ES3Cloud.RenameFile

public static IEnumerator RenameFile(string oldFilePath, string newFilePath, string user, string password, ES3Settings settings)

Description

Renames a file on the server for the given user, or renames a global filename if no user is specified.

Parameters

[table th=”0″]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.”[/table]

Examples

C#

// 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);