blob: 2cf14704d693a23115cf30f68b92142b21603e8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
namespace StardewModdingAPI.Toolkit.Utilities.PathLookups
{
/// <summary>An API for relative path lookups within a root directory with minimal preprocessing.</summary>
internal class MinimalPathLookup : IFilePathLookup
{
/*********
** Accessors
*********/
/// <summary>A singleton instance for reuse.</summary>
public static readonly MinimalPathLookup Instance = new();
/*********
** Public methods
*********/
/// <inheritdoc />
public string GetFilePath(string relativePath)
{
return PathUtilities.NormalizePath(relativePath);
}
/// <inheritdoc />
public string GetAssetName(string relativePath)
{
return PathUtilities.NormalizeAssetName(relativePath);
}
/// <inheritdoc />
public void Add(string relativePath) { }
}
}
|