Пример #1
0
 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);
     }
 }
Пример #2
0
        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);
        }