for Push.

This commit is contained in:
nobobo
2026-06-01 13:23:34 +09:00
parent 9e093ea99f
commit a6550e9928
93 changed files with 10393 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
using KssSmaPlaLib.Batch.Interface;
using KssSmaPlaLib.Cleanup;
using KssSmaPlaLib.Commons;
using KssSmaPlaLib.Ini;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static KssSmaPlaLib.Batch.Sftp.SftpStepHandlerUxer;
namespace KssSmaPlaLib.Batch.Cleanup
{
public class CleanupStepHandlerUxer
{
public FuncCleanupByIniResultDto TryFuncCleanupByIni(
string iniFilePath,
string secsionName)
{
const string KEY_FOLDER_PATH = "FolderPath";
var result = new FuncCleanupByIniResultDto();
var cuDic = IniReferenceResolveUxer.ReadSectionWithReference(iniFilePath, secsionName);
var folderPath = DictionaryUxer.GetValueOrDefault(cuDic, KEY_FOLDER_PATH, string.Empty);
if (string.IsNullOrEmpty(folderPath))
{
LoggerUxer.Info($"フォルダパスが未指定のため、クリーンアップ機能をスキップしました。[キー:{KEY_FOLDER_PATH}]");
result.Succeeded = true;
return result;
}
if (!FileCleanupUxer.TryFileCleanupByDic(cuDic, out var messageForMe))
{
result.ResultMessage = $"ファイルのクリーンナップに失敗しました。[エラー内容:{messageForMe}]";
result.ExitCode = (int)RetCodeUxer.RetCode.CleanupError;
result.Succeeded = false;
return result;
}
result.Succeeded = true;
return result;
}
public class FuncCleanupByIniResultDto : IFuncResultDto
{
public bool Succeeded { get; set; } = false;
public int ExitCode { get; set; } = 0;
public string ResultMessage { get; set; } = string.Empty;
}
}
}