/* * Fetches output path, using the GetPath method. * Also has handling for when a output file of that name already exists. */ public static string GetOutputPath(string relativeOutputPath) { string outputFilePath = ArgParser.GetPath(relativeOutputPath); if (File.Exists(outputFilePath)) { throw new ArgumentException("Output file " + outputFilePath + " already exists. System exit."); } return(outputFilePath); }
/* * Fetches input path, using the GetPath method. * Also has handling for when a input file is not found. */ public static string GetInputPath(string relativeInputPath) { string inputPath = ArgParser.GetPath(relativeInputPath); if (File.Exists(inputPath)) { return(inputPath); } else { throw new ArgumentException("file " + inputPath + " does not exist. System exit"); } }