Rename
editorconfig
This commit is contained in:
@ -35,9 +35,9 @@ public class CopyDistinct
|
||||
_Configuration = configuration;
|
||||
logger?.LogInformation(propertyConfiguration.RootDirectory);
|
||||
(bool move, List<string[]> filesCollection, bool anyLenFiles, bool moveBack) = Verify();
|
||||
_FileGroups = Shared.Models.Stateless.Methods.IPath.GetKeyValuePairs(propertyConfiguration, appSettings.CopyTo, new string[] { appSettings.ResultDirectoryKey });
|
||||
_FileGroups = Shared.Models.Stateless.Methods.IPath.GetKeyValuePairs(propertyConfiguration, appSettings.CopyTo, [appSettings.ResultDirectoryKey]);
|
||||
List<string> lines = CopyDistinctFilesInDirectories(logger, move, filesCollection, anyLenFiles, moveBack);
|
||||
if (lines.Any())
|
||||
if (lines.Count != 0)
|
||||
File.WriteAllLines($"D:/Tmp/Phares/{DateTime.Now.Ticks}.tsv", lines);
|
||||
_ = Shared.Models.Stateless.Methods.IPath.DeleteEmptyDirectories(propertyConfiguration.RootDirectory);
|
||||
}
|
||||
@ -77,7 +77,7 @@ public class CopyDistinct
|
||||
moveBack = false;
|
||||
else
|
||||
{
|
||||
if (!Directory.GetFiles(directory, "*", SearchOption.AllDirectories).Any())
|
||||
if (Directory.GetFiles(directory, "*", SearchOption.AllDirectories).Length == 0)
|
||||
moveBack = false;
|
||||
else
|
||||
{
|
||||
@ -93,16 +93,16 @@ public class CopyDistinct
|
||||
|
||||
private static (string[], List<(FileHolder, string?, string)>) GetMoveBackToDoCollection(List<string[]> filesCollection)
|
||||
{
|
||||
List<(FileHolder, string?, string)> results = new();
|
||||
List<(FileHolder, string?, string)> results = [];
|
||||
string key;
|
||||
string? value;
|
||||
string fileName;
|
||||
string? directory;
|
||||
string destinationFile;
|
||||
List<string> distinctFound = new();
|
||||
List<string> distinctNeeded = new();
|
||||
List<string> distinctDirectories = new();
|
||||
Dictionary<string, string> nameToPath = new();
|
||||
List<string> distinctFound = [];
|
||||
List<string> distinctNeeded = [];
|
||||
List<string> distinctDirectories = [];
|
||||
Dictionary<string, string> nameToPath = [];
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
foreach (string[] files in filesCollection)
|
||||
@ -155,7 +155,7 @@ public class CopyDistinct
|
||||
|
||||
private List<string> CopyDistinctFilesInDirectories(ILogger<Program>? logger, bool move, List<string[]> filesCollection, bool anyLenFiles, bool moveBack)
|
||||
{
|
||||
List<string> results = new();
|
||||
List<string> results = [];
|
||||
ProgressBar progressBar;
|
||||
string[] distinctDirectories;
|
||||
ConsoleKey? consoleKey = null;
|
||||
|
@ -60,7 +60,7 @@ public class Program
|
||||
if (args is not null)
|
||||
Secondary(logger, args.ToList());
|
||||
else
|
||||
Secondary(logger, new List<string>());
|
||||
Secondary(logger, []);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user