PARR.EsppTemplateSyncWorker
This commit is contained in:
@@ -99,5 +99,26 @@ namespace PARR.BLL.Services.Implementations
|
||||
//return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool DeleteFile(string path)
|
||||
{
|
||||
logger.LogInformation($"Удаляю файл: {path}");
|
||||
|
||||
try
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
return true;
|
||||
|
||||
File.Delete(path);
|
||||
logger.LogInformation($"Файл удален: {path}");
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.LogError(e, $"Ошибка при удалении файла {path}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user