diff --git a/dvs-rpkg/R/dvs-commands.R b/dvs-rpkg/R/dvs-commands.R index 6c4a561..4e099af 100644 --- a/dvs-rpkg/R/dvs-commands.R +++ b/dvs-rpkg/R/dvs-commands.R @@ -70,6 +70,14 @@ dvs_status <- function( status = status ) + if (nrow(status_data_frame) == 0) { + if (setequal(status, c("current", "absent", "unsynced"))) { + message("No tracked files") + } else { + message("No tracked files matching the filter") + } + } + if (!is.null(status_data_frame$size)) { status_data_frame$size <- new_dvs_bytes(status_data_frame$size) } @@ -94,6 +102,13 @@ dvs_get <- function(paths = character(0), glob = NULL, dry_run = NULL) { progress_callback = progress_callback ) + copied_mask <- !is.na(get_data_frame[["outcome"]]) & get_data_frame[["outcome"]] == "copied" + total_files <- sum(copied_mask) + if (total_files > 0) { + total_bytes <- sum(get_data_frame[["size"]][copied_mask]) + message("Total: ", total_files, " files, ", format_byte_size(total_bytes)) + } + if (!is.null(get_data_frame$size)) { get_data_frame$size <- new_dvs_bytes(get_data_frame$size) }