public static void GetData(string path)
        {
            DirectoryInfo dir = new DirectoryInfo(SystemFolder.DataDir);

            foreach (FileInfo file in dir.GetFiles())
            {
                if (file.Extension.Equals(".in"))
                {
                    file.CopyTo(SystemFolder.GetTestInDir() + @"\" + file.Name);
                }
                if (file.Extension.Equals(".out") || file.Extension.Equals(".ans"))
                {
                    //string text = File.ReadAllText(file.FullName);
                    //File.WriteAllText(SystemFolder.GetTestOutDir() + @"\" + file.Name, text.TrimEnd('\n').TrimEnd('\r'));
                    //file.CopyTo(SystemFolder.GetTestOutDir() + @"\" + file.Name);

                    string[] lines = File.ReadAllLines(file.FullName);
                    for (int i = 0; i < lines.Length; ++i)
                    {
                        lines[i] = lines[i].Trim();
                    }
                    File.WriteAllLines(SystemFolder.GetTestOutDir() + @"\" + file.Name, lines);
                    string text = File.ReadAllText(SystemFolder.GetTestOutDir() + @"\" + file.Name);
                    File.WriteAllText(SystemFolder.GetTestOutDir() + @"\" + file.Name, text.TrimEnd('\n').TrimEnd('\r'));
                }
            }
        }
        public static string[] GetOutputFilePaths(string path)
        {
            string        extenstion = customFileExtension != null ? customFileExtension : textFileExtension;
            DirectoryInfo dir        = new DirectoryInfo(path);

            string[] filePaths = new string[dir.GetFiles().Length];
            int      i         = 0;

            foreach (FileInfo file in dir.GetFiles())
            {
                int    index = file.Name.LastIndexOf('.');
                string temp  = file.Name.Substring(0, index);
                string name  = SystemFolder.GetOutDir() + @"\" + temp + extenstion;
                filePaths[i++] = name;
            }
            return(filePaths);
        }
 public static string GetCSharpFilePath()
 {
     return(SystemFolder.GetMainDir() + pathFormat + targetFileName + csharpFileExtension);
 }
        public static string[] GetRunCSharpCommands(string Path)
        {
            string OutType = textFileExtension;

            if (customFileExtension.Equals(outputFileExtension))
            {
                OutType = outputFileExtension;
            }
            if (customFileExtension.Equals(answerFileExtension))
            {
                OutType = answerFileExtension;
            }
            DirectoryInfo Dir = new DirectoryInfo(Path);

            string[] Commands = new string[Dir.GetFiles().Length];
            int      i        = 0;

            foreach (FileInfo File in Dir.GetFiles())
            {
                int    Index   = File.Name.LastIndexOf('.');
                string Temp    = File.Name.Substring(0, Index);
                string Command = "Main < " + '"' + Path + @"\" + File.Name + '"' + " > " + '"' + SystemFolder.GetOutDir() + @"\" + Temp + OutType + '"';
                Commands[i++] = Command;
            }
            return(Commands);
        }