/// <summary> /// Gets the fully qualified path to the expected output file produced by the conversion tool. /// </summary> /// <param name="rom">The ROM whose conversion output file is desired.</param> /// <param name="romStagingAreaPath">The staging area directory for the ROM.</param> /// <param name="programFileKind">Target program file kind.</param> /// <param name="includeOriginalFormat">If <c>true</c>, include the original ROM file format as part of the output file name.</param> /// <returns>The fully qualified path to the expected output file.</returns> public static string GetOutputFilePath(this IRom rom, string romStagingAreaPath, INTV.Core.Model.Program.ProgramFileKind programFileKind, bool includeOriginalFormat) { var cachedPath = rom.GetCachedRomFilePath(romStagingAreaPath); var extension = System.IO.Path.GetExtension(cachedPath); if (includeOriginalFormat) { var originalExtension = rom.Format.FileExtension(); var suffix = originalExtension.Replace('.', '_'); cachedPath = cachedPath + suffix + originalExtension; } cachedPath = System.IO.Path.ChangeExtension(cachedPath, extension); var path = System.IO.Path.ChangeExtension(cachedPath, programFileKind.FileExtension()); return(path); }
/// <summary> /// Gets the fully qualified path to the expected output file produced by the conversion tool. /// </summary> /// <param name="rom">The ROM whose conversion output file is desired.</param> /// <param name="romStagingAreaPath">The staging area directory for the ROM.</param> /// <param name="programFileKind">Target program file kind.</param> /// <returns>The fully qualified path to the expected output file.</returns> public static string GetOutputFilePath(this IRom rom, string romStagingAreaPath, INTV.Core.Model.Program.ProgramFileKind programFileKind) { return(rom.GetOutputFilePath(romStagingAreaPath, programFileKind, true)); }