Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions dvs-rpkg/R/dvs-commands.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down
Loading