ES3Cloud.DownloadFilenames
Description
Downloads the names of all of the files on the server for a given user.
After downloading, you can then get an array of filenames using the ES3Cloud‘s ES3Cloud.filenames variable.
If no user parameter is provided, it will get the names of all of the global files.
For more information, see the Uploading and Downloading Files using ES3Cloud guide.
Parameters
user | [Optional] The name of the user we want to get the filenames of. |
password |
[Optional] The password of the user we want to get the filenames of. |
Examples
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
// Create a new ES3Cloud object with the URL to our ES3Cloud.php file. var cloud = new ES3Cloud("https://www.myserver.com/ES3Cloud.php", "myAPIKey"); // Download the filenames of a particular user and output them to console. yield return StartCoroutine(cloud.DownloadFilenames("myUser", "myUsersPassword")); if(cloud.isError) Debug.LogError(cloud.error); foreach(var filename in cloud.filenames) Debug.Log(filename); // Download the filenames of all global files on the server and output them to console. yield return StartCoroutine(cloud.DownloadFilenames()); if(cloud.isError) Debug.LogError(cloud.error); foreach(var filename in cloud.filenames) Debug.Log(filename); |
JS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
// Create a new ES3Cloud object with the URL to our ES3Cloud.php file. var cloud = new ES3Cloud("https://www.myserver.com/ES3Cloud.php", "myAPIKey"); // Download the filenames of a particular user and output them to console. yield cloud.DownloadFilenames("myUser", "myUsersPassword"); if(cloud.isError) Debug.LogError(cloud.error); foreach(var filename in cloud.filenames) Debug.Log(filename); // Download the filenames of all global files on the server and output them to console. yield cloud.DownloadFilenames(); if(cloud.isError) Debug.LogError(cloud.error); foreach(var filename in cloud.filenames) Debug.Log(filename); |