LootDumpProcessor/Storage/Implementations/File/Handlers/SubdivisionedStoreHandler.cs

26 lines
717 B
C#
Raw Normal View History

2023-08-12 19:08:38 +01:00
namespace LootDumpProcessor.Storage.Implementations.Handlers;
public class SubdivisionedStoreHandler : AbstractStoreHandler
{
public override List<T> RetrieveAll<T>()
{
throw new NotImplementedException();
}
protected override string GetLocation(IKey key)
{
var location = $"{GetBaseLocation()}/{string.Join("/",key.GetLookupIndex().SkipLast(1))}";
if (!Directory.Exists(location))
{
Directory.CreateDirectory(location);
}
return $"{location}/{key.GetLookupIndex().Last()}.{_serializer.GetExtension()}";
}
protected override string GetBaseLocation()
{
return $"{base.GetBaseLocation()}/subdivisioned";
}
}