mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Reduce more complexity
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using SabreTools.Hashing;
|
||||
using SabreTools.IO.Extensions;
|
||||
using SabreTools.Matching;
|
||||
|
||||
namespace SabreTools.Core.Tools
|
||||
@@ -45,6 +46,18 @@ namespace SabreTools.Core.Tools
|
||||
return string.Equals(firstHash, secondHash, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a proper romba sub path
|
||||
/// </summary>
|
||||
/// <param name="hash">SHA-1 hash to get the path for</param>
|
||||
/// <param name="depth">Positive value representing the depth of the depot</param>
|
||||
/// <returns>Subfolder path for the given hash</returns>
|
||||
public static string? GetDepotPath(byte[]? hash, int depth)
|
||||
{
|
||||
string? sha1 = ByteArrayExtensions.ByteArrayToString(hash);
|
||||
return GetDepotPath(sha1, depth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a proper romba sub path
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user