protected override void Delete() { try { SendReport($"Deleting contents of folder {SourceDirectory} ...", ReportType.Progress); FileSystemCommands.DirectoryDeleteContentsOnly(SourceDirectory, deleteProgress); DidCommandSucceed = true; SendReport($"Deleted contents of folder {SourceDirectory}", ReportType.DoneTaskWithSuccess); } catch (Exception exc) { DidCommandSucceed = false; SendReport($"Failed to delete contents of folder {SourceDirectory}. {exc.Message}", ReportType.DoneTaskWithFailure); } }
protected override void RunUndo() { FileSystemCommands.DirectoryDeleteContentsOnly(SourceDirectory, null); FileSystemCommands.DirectoryMoveContents(BackedUpDirectory, SourceDirectory); }