thisisnic commented on code in PR #34477:
URL: https://github.com/apache/arrow/pull/34477#discussion_r1129267531
##########
r/R/filesystem.R:
##########
@@ -547,6 +561,11 @@ GcsFileSystem$create <- function(anonymous = FALSE,
retry_limit_seconds = 15, ..
)
}
+ # Stop if expiration isn't a POSIXct
+ if ("expiration" %in% names(options) && !inherits(options$expiration,
"POSIXct")) {
+ stop("Option 'expiration' must be of class POSIXct", call. = FALSE)
Review Comment:
You could extend this to make it even more helpful by printing out the class
of the object, e.g. something like
`paste("Option 'expiration' must be of class POSIXct, not",
class(options$expiration)[[1]])`
Only a minor point - feel free to leave it as-is.
##########
r/src/filesystem.cpp:
##########
@@ -422,4 +423,65 @@ std::shared_ptr<fs::GcsFileSystem>
fs___GcsFileSystem__Make(bool anonymous,
return fs::GcsFileSystem::Make(gcs_opts, io_context);
}
+// [[gcs::export]]
+cpp11::list fs___GcsFileSystem__options(const
std::shared_ptr<fs::GcsFileSystem>& fs) {
+ using cpp11::literals::operator"" _nm;
+
+ cpp11::writable::list out;
+
+ fs::GcsOptions opts = fs->options();
+
+ // GcsCredentials
+ out.push_back({"anonymous"_nm = opts.credentials.anonymous()});
+
+ if (opts.credentials.access_token() != "") {
+ out.push_back({"access_token"_nm = opts.credentials.access_token()});
+ }
+
+ // TODO: Cast to posixct?
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]