Return Folder Name In String

Hey Guys! Creeperbot65 here!

I’m having trouble trying to get the FOLDER name from a directory. Here’s the code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using UnityEngine.UI;
using System.IO;

public class LoadGameFolders : MonoBehaviour {

	public Dropdown GameList;

	void Awake () {
		
		DirectoryInfo dir = new DirectoryInfo(Application.streamingAssetsPath);
		DirectoryInfo[] info = dir.GetDirectories ();

		foreach (DirectoryInfo f in info)
		{
            List<string> DDList = new List<string>() {  };
		}

	}
}

Thanks!

-creeperbot65

Never Mind! I found out that all you had to do was put f.Name between the Curly Brackets ( { } )

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using UnityEngine.UI;
using System.IO;

public class LoadGameFolders : MonoBehaviour {

	public Dropdown GameList;

	void Awake () {
		
		DirectoryInfo dir = new DirectoryInfo(Application.streamingAssetsPath);
		DirectoryInfo[] info = dir.GetDirectories ();

		foreach (DirectoryInfo f in info)
		{
            List<string> DDList = new List<string>() { f.Name };
            GameList.AddOptions(DDList);
		}

	}
}