summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit/Utilities/PathLookups/IFilePathLookup.cs
blob: 678e1383d2dd9267abdc721d7b4d633b878dc7a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
namespace StardewModdingAPI.Toolkit.Utilities.PathLookups
{
    /// <summary>An API for relative path lookups within a root directory.</summary>
    internal interface IFilePathLookup
    {
        /// <summary>Get the actual path for a given relative file path.</summary>
        /// <param name="relativePath">The relative path.</param>
        /// <remarks>Returns the resolved path in file path format, else the normalized <paramref name="relativePath"/>.</remarks>
        string GetFilePath(string relativePath);

        /// <summary>Get the actual path for a given asset name.</summary>
        /// <param name="relativePath">The relative path.</param>
        /// <remarks>Returns the resolved path in asset name format, else the normalized <paramref name="relativePath"/>.</remarks>
        string GetAssetName(string relativePath);

        /// <summary>Add a relative path that was just created by a SMAPI API.</summary>
        /// <param name="relativePath">The relative path. This must already be normalized in asset name or file path format.</param>
        void Add(string relativePath);
    }
}