1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00
Radarr/NzbDrone.Api/Frontend/StaticResourceMapper.cs
2013-05-16 20:03:52 -07:00

18 lines
472 B
C#

using System.IO;
namespace NzbDrone.Api.Frontend
{
public class StaticResourceMapper : IMapHttpRequestsToDisk
{
public string Map(string resourceUrl)
{
var path = resourceUrl.Replace('/', Path.DirectorySeparatorChar);
path = path.Trim(Path.DirectorySeparatorChar).ToLower();
return Path.Combine("ui", path);
}
public RequestType IHandle { get { return RequestType.StaticResources; } }
}
}