try
{
if (!Directory.Exists("Assets/Editor Music Player/Data"))
Directory.CreateDirectory("Assets/Editor Music Player/Data");
if (!File.Exists("Assets/Editor Music Player/Data/trackList.txt"))
File.Create("Assets/Editor Music Player/Data/trackList.txt");
File.WriteAllLines("Assets/Editor Music Player/Data/trackList.txt", dir);
}
catch (IOException ex)
{
MessageBox.Show(ex.Message);
}