Skip to content

Commit

Permalink
feat(app): #1 improve handling of metadata summary for unknown filetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAxthelm committed Mar 14, 2024
1 parent 9af1650 commit c37466b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/get_file_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ get_single_file_metadata <- function(filepath) {
file_name <- basename(filepath)
file_extension <- tools::file_ext(filepath)
file_path <- filepath
file_size <- file.info(filepath)[["size"]]
file_size <- as.integer(file.info(filepath)[["size"]])
file_last_modified <- format(
as.POSIXlt(file.info(filepath)[["mtime"]], tz = "UTC"),
"%Y-%m-%dT%H:%M:%S+00:00"
Expand Down Expand Up @@ -67,13 +67,15 @@ get_single_file_metadata <- function(filepath) {
colnames = colnames(contents),
class = class(contents)
)
} else {
} else if (!is.null(contents)) {
logger::log_trace(
"Only data.frame objects supported for summary information."
)
summary_info <- list(
class = class(contents)
)
} else {
summary_info <- NULL
}

if (exists("summary_info")) {
Expand Down

0 comments on commit c37466b

Please sign in to comment.