public async Task Find([Option('d')] bool delete = false)
 {
     try
     {
         var currentDirectory = Directory.GetCurrentDirectory();
         var finder           = new DuplicateFileFinder(currentDirectory);
         await finder.FindAndDeleteAsync(delete, this.Context.CancellationToken);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
     }
 }
Beispiel #2
0
        static async Task Main()
        {
            // TODO: While testing, point to some sample data
            const string basePath = "c:\\git\\";

            IDuplicateFileFinder implementation = new DuplicateFileFinder();

            var sw    = Stopwatch.StartNew();
            var dupes = await implementation.FindDuplicatesAsync(basePath);

            sw.Stop();

            PrintResults(dupes, sw.Elapsed);
        }