format
This commit is contained in:
@ -21,7 +21,7 @@ public class DeleteByRelative
|
||||
string searchPattern = "*";
|
||||
long ticks = DateTime.Now.Ticks;
|
||||
Configuration configuration = Property.Models.Binder.Configuration.Get(isEnvironment, configurationRoot);
|
||||
logger?.LogInformation(configuration.RootDirectory);
|
||||
logger?.LogInformation(configuration.RootDirectory);
|
||||
int length = configuration.RootDirectory.Length;
|
||||
if (string.IsNullOrEmpty(appSettings.CompareRootDirectory) || Path.GetFullPath(appSettings.CompareRootDirectory) == Path.GetFullPath(configuration.RootDirectory))
|
||||
throw new Exception("Check AppSettings file!");
|
||||
@ -59,14 +59,14 @@ public class DeleteByRelative
|
||||
File.WriteAllLines(deleteLog, deleteFiles);
|
||||
if (deleteFiles.Count > 0)
|
||||
{
|
||||
logger?.LogInformation($"Ready to delete {deleteFiles.Count} file(s)? See <{deleteLog}>");
|
||||
logger?.LogInformation($"Ready to delete {deleteFiles.Count} file(s)? See <{deleteLog}>");
|
||||
for (int y = 0; y < int.MaxValue; y++)
|
||||
{
|
||||
logger?.LogInformation("Press \"Y\" key to delete file(s) or close console to not delete files");
|
||||
logger?.LogInformation("Press \"Y\" key to delete file(s) or close console to not delete files");
|
||||
if (Console.ReadKey().Key == ConsoleKey.Y)
|
||||
break;
|
||||
}
|
||||
logger?.LogInformation(". . .");
|
||||
logger?.LogInformation(". . .");
|
||||
foreach (string deleteFile in deleteFiles)
|
||||
{
|
||||
File.Delete(deleteFile);
|
||||
|
Reference in New Issue
Block a user