DarkEmu_GameServer.Systems.CheckFile C# (CSharp) Метод

CheckFile() публичный Метод

public CheckFile ( ) : void
Результат void
        void CheckFile()
        {
            //Wrap our function inside a catcher
            try
            {
                //Set path for quickbar
                string player_path = Environment.CurrentDirectory + @"\player\info\";
                if (!System.IO.File.Exists(player_path + @"quickbar\" + Character.Information.Name + ".dat"))
                {
                    byte[] by = new byte[255];
                    for (byte i = 0; i <= 254; i++) by[i] = 0x00;
                    System.IO.File.Create(player_path + @"quickbar\" + Character.Information.Name + ".dat").Close();
                    System.IO.File.WriteAllBytes(player_path + @"quickbar\" + Character.Information.Name + ".dat", by);
                }
                //Set path for autopotion
                if (!System.IO.File.Exists(player_path + @"autopot\" + Character.Information.Name + ".dat"))
                {
                    byte[] by = new byte[255];
                    for (byte i = 0; i <= 6; i++) by[i] = 0x00;
                    System.IO.File.Create(player_path + @"autopot\" + Character.Information.Name + ".dat").Close();
                    System.IO.File.WriteAllBytes(player_path + @"autopot\" + Character.Information.Name + ".dat", by);
                }
                //Set debug information
                if (!System.IO.File.Exists(player_path + @"debug\" + Character.Information.Name + ".txt"))
                {
                    System.IO.File.Create(player_path + @"debug\" + Character.Information.Name + ".txt").Close();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Quickbar and potion error {0}", ex);
                Systems.Debugger.Write(ex);
            }
        }
Systems