private void WriteJsonFile(string file, CompileCommand command) { if (!String.IsNullOrEmpty(file)) { if (_verbose) { Console.WriteLine("Writing file: " + file); } File.WriteAllLines(file, command.ToJson()); } }
private string GetOutputFile(string path, CompileCommand command, string extension) { var file = Path.ChangeExtension(Path.GetFileName(command.File), extension); return(String.IsNullOrEmpty(path) ? file : Path.Combine(path, file)); }
private void WriteOutputFile(string jsonFile, string objectFile, string pdbFile, CompileCommand command) { // We need to read the file for tracking ReadInputFile(command.File); WriteJsonFile(jsonFile, command); // Create dummy object and PDB files TouchOutputFile(objectFile); TouchOutputFile(pdbFile); }