ES3.GetDirectories
public static string[] GetDirectories(string directoryPath, ES3Settings settings)
Description
Gets an array of sub-directory names from a directory.
Parameters
[table th=”0″]directoryPath,”[Optional] The relative or absolute path of the directory we want to get the sub-directory names from.”
settings,”[Optional] The settings we want to use to override the default settings.”[/table]
Returns
An array of directory names. For example: {“folder1”, “folder2”, “folder3”}.
Examples
C#
// Save some files to different directories the default save directory. ES3.Save<int>("key", 123, "parentFolder/myFolder1/myFile.es3"); ES3.Save<int>("key", 123, "parentFolder/myFolder2/myFile.es3"); ES3.Save<int>("key", 123, "parentFolder/myFolder3/myFile.es3"); // Now get the names of the directories we created and log them to console. foreach(var directoryName in ES3.GetDirectories("parentFolder/")) Debug.Log(fileName); // Outputs: // myFolder1 // myFolder2 // myFolder3
JS
// Save some files to different directories the default save directory. ES3.Save.<int>("key", 123, "parentFolder/myFolder1/myFile.es3"); ES3.Save.<int>("key", 123, "parentFolder/myFolder2/myFile.es3"); ES3.Save.<int>("key", 123, "parentFolder/myFolder3/myFile.es3"); // Now get the names of the directories we created and log them to console. foreach(var directoryName in ES3.GetDirectories("parentFolder/")) Debug.Log(fileName); // Outputs: // myFolder1 // myFolder2 // myFolder3