public static void EnsureAllDataFoldersExist() { string[] folders = { "characters", "LaunchFiles", "Logs", "Profiles", "Running", "Servers" }; foreach (var folderName in folders) { string directory = Path.Combine(AppFolder, folderName); FileLocations.EnsureFolderExists(directory); } }
public static List <string> EnumerateCharacterFilepaths() { List <string> filepaths = new List <string>(); string xpath = FileLocations.GetCharacterFilePath(ServerName: GameRepo.Game.Server, AccountName: GameRepo.Game.Account); string chardir = System.IO.Path.GetDirectoryName(xpath); FileLocations.EnsureFolderExists(chardir); foreach (string charfilename in Directory.GetFiles(chardir)) { string path = Path.Combine(chardir, charfilename); filepaths.Add(path); } return(filepaths); }