ES3Cloud.SearchFilenames
Description
Downloads the names of all of the files on the server for a given user which match the given search pattern. The search pattern supports the ‘%’ and ‘_’ wildcards as described here.
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
searchPattern | A search pattern containing '%' or '_' wildcards where '%' represents zero, one, or multiple characters, and '_' represents a single character. |
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
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 which begin with 'myFolder/' and output them to console. */ yield return StartCoroutine(cloud.SearchFilenames("myFolder/%", "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 which begin with 'myFolder/' and output them to console. yield return StartCoroutine(cloud.DownloadFilenames("myFolder/%")); if(cloud.isError) Debug.LogError(cloud.error); foreach(var filename in cloud.filenames) Debug.Log(filename); |