diff --git a/R/adls_client_funcs.R b/R/adls_client_funcs.R index f9cc627..ed881d5 100644 --- a/R/adls_client_funcs.R +++ b/R/adls_client_funcs.R @@ -72,7 +72,9 @@ adls_filesystem.adls_endpoint <- function(endpoint, name, ...) print.adls_filesystem <- function(x, ...) { cat("Azure Data Lake Storage Gen2 filesystem '", x$name, "'\n", sep="") - cat(sprintf("URL: %s\n", paste0(x$endpoint$url, x$name))) + url <- httr::parse_url(x$endpoint$url) + url$path <- x$name + cat(sprintf("URL: %s\n", httr::build_url(url))) if(!is_empty(x$endpoint$key)) cat("Access key: \n") diff --git a/R/blob_client_funcs.R b/R/blob_client_funcs.R index cb90ea2..2e6b1e7 100644 --- a/R/blob_client_funcs.R +++ b/R/blob_client_funcs.R @@ -81,7 +81,9 @@ blob_container.blob_endpoint <- function(endpoint, name, ...) print.blob_container <- function(x, ...) { cat("Azure blob container '", x$name, "'\n", sep="") - cat(sprintf("URL: %s\n", paste0(x$endpoint$url, x$name))) + url <- httr::parse_url(x$endpoint$url) + url$path <- x$name + cat(sprintf("URL: %s\n", httr::build_url(url))) if(!is_empty(x$endpoint$key)) cat("Access key: \n") diff --git a/R/file_client_funcs.R b/R/file_client_funcs.R index be78f18..c92e111 100644 --- a/R/file_client_funcs.R +++ b/R/file_client_funcs.R @@ -70,13 +70,25 @@ file_share.file_endpoint <- function(endpoint, name, ...) print.file_share <- function(x, ...) { cat("Azure file share '", x$name, "'\n", sep="") - cat(sprintf("URL: %s\n", paste0(x$endpoint$url, x$name))) + url <- httr::parse_url(x$endpoint$url) + url$path <- x$name + cat(sprintf("URL: %s\n", httr::build_url(url))) + if(!is_empty(x$endpoint$key)) cat("Access key: \n") else cat("Access key: \n") + + if(!is_empty(x$endpoint$token)) + { + cat("Azure Active Directory token:\n") + print(x$endpoint$token) + } + else cat("Azure Active Directory token: \n") + if(!is_empty(x$endpoint$sas)) cat("Account shared access signature: \n") else cat("Account shared access signature: \n") + cat(sprintf("Storage API version: %s\n", x$endpoint$api_version)) invisible(x) }