Updating
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
using LCU.Library.Internal.FileOperationsModels.Shared;
|
||||
using LCU.Library.Internal.Exceptions;
|
||||
namespace LCU.Api.Internal.FileOperations.Services;
|
||||
|
||||
public class DynamicDirectoryService : IDynamicDirectoryService
|
||||
{
|
||||
public IEnumerable<string> BuildDirectoryList(DynamicDirectoryListRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dynamicDirectoryNameWithDates = DynamicNameBuilder.BuildDynamicName(request.DynamicDirectoryName, request.DynamicFileSettings);
|
||||
var directoryNameList = RegexNameHandler.BuildDirectoryList(request.Path, dynamicDirectoryNameWithDates, request.DynamicFileSettings);
|
||||
return directoryNameList;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, $"Error while trying to build directory list. Request: {JsonConvert.SerializeObject(request)}");
|
||||
throw new ServiceException(exception.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user