ES3Cloud.DeleteFile
Description
Deletes a file from the server.
Note that all parameters are optional.
If no filePath parameter is provided, it will attempt to delete the default file.
If no user parameter is provided, it will delete the global file with the given name.
For more information, see the Uploading and Downloading Files using ES3Cloud guide.
Parameters
filePath | [Optional] The relative or absolute path of the local file we want to delete from the server. |
user |
[Optional] The name of the user this file belongs to, if the file is not 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 ES3Cloud.php file. var cloud = new ES3Cloud("https://www.myserver.com/ES3Cloud.php", "myAPIKey"); // Delete a file from the server which is specific to a particular user. yield return StartCoroutine(cloud.DeleteFile("myFile.es3", "myUser", "myUsersPassword")); if(cloud.isError) Debug.LogError(cloud.error); // Delete a file from the server which is global for all users. yield return StartCoroutine(cloud.DeleteFile("myGlobalFile.es3")); if(cloud.isError) Debug.LogError(cloud.error); |
JS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// Create a new ES3Cloud object with the URL to our ES3Cloud.php file. var cloud = new ES3Cloud("https://www.myserver.com/ES3Cloud.php", "myAPIKey"); // Delete a file from the server which is specific to a particular user. yield cloud.DeleteFile("myFile.es3", "myUser", "myUsersPassword"); if(cloud.isError) Debug.LogError(cloud.error); // Delete a file from the server which is global for all users. yield cloud.DeleteFile("myGlobalFile.es3"); if(cloud.isError) Debug.LogError(cloud.error); |