예제 #1
0
        public static string[] GetOutputFilePaths(string Path)
        {
            string OutType = TextFileType;

            if (customFileType.Equals(OutputFileType))
            {
                OutType = OutputFileType;
            }
            if (customFileType.Equals(AnswerFileType))
            {
                OutType = AnswerFileType;
            }
            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  = Directories.GetOutDir() + @"\" + Temp + OutType;
                FilePaths[i++] = Name;
            }
            return(FilePaths);
        }
예제 #2
0
        public static string[] GetRunJavaCommands(string Path)
        {
            string OutType = TextFileType;

            if (customFileType.Equals(OutputFileType))
            {
                OutType = OutputFileType;
            }
            if (customFileType.Equals(AnswerFileType))
            {
                OutType = AnswerFileType;
            }
            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 = "java Main < " + '"' + Path + @"\" + File.Name + '"' + " > " + '"' + Directories.GetOutDir() + @"\" + Temp + OutType + '"';
                Commands[i++] = Command;
            }
            return(Commands);
        }