mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Swap order of file GetInfo method params
This commit is contained in:
@@ -406,7 +406,7 @@ namespace SabreTools.DatTools
|
||||
{
|
||||
logger.Verbose($"'{Path.GetFileName(item)}' treated like a file");
|
||||
var header = datFile.Header.GetStringFieldValue(Models.Metadata.Header.HeaderKey);
|
||||
BaseFile? baseFile = FileTypeTool.GetInfo(item, header, _hashes);
|
||||
BaseFile? baseFile = FileTypeTool.GetInfo(item, _hashes, header);
|
||||
DatItem? datItem = DatItemTool.CreateDatItem(baseFile, asFile);
|
||||
if (datItem != null)
|
||||
ProcessFileHelper(datFile, item, datItem, basePath, string.Empty);
|
||||
|
||||
@@ -21,16 +21,16 @@ namespace SabreTools.FileTypes
|
||||
/// <param name="hashes">Hashes to include in the information</param>
|
||||
/// <returns>Populated BaseFile object if success, empty on error</returns>
|
||||
public static BaseFile GetInfo(string input, HashType[] hashes)
|
||||
=> GetInfo(input, header: null, hashes);
|
||||
=> GetInfo(input, hashes, header: null);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve file information for a single file
|
||||
/// </summary>
|
||||
/// <param name="input">Filename to get information from</param>
|
||||
/// <param name="header">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="hashes">Hashes to include in the information</param>
|
||||
/// <param name="header">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <returns>Populated BaseFile object if success, empty on error</returns>
|
||||
public static BaseFile GetInfo(string input, string? header, HashType[] hashes)
|
||||
public static BaseFile GetInfo(string input, HashType[] hashes, string? header)
|
||||
{
|
||||
// Add safeguard if file doesn't exist
|
||||
if (!File.Exists(input))
|
||||
|
||||
Reference in New Issue
Block a user