Carl Boettiger created ARROW-17120:
--------------------------------------
Summary: copy_files() does not take paths to specific files
Key: ARROW-17120
URL: https://issues.apache.org/jira/browse/ARROW-17120
Project: Apache Arrow
Issue Type: Improvement
Components: R
Reporter: Carl Boettiger
`copy_files()` is a pretty handy function for working between local and remote
interfaces, particularly for any file type arrow doesn't handle (arvo, ncdf,
h5, etc etc).
Unfortunately, it seems to work only from directory-to-directory, at least in
the direction of copying S3 -> local file system. e.g. this reprex:
{code:java}
library(arrow)
local_dir <- tempfile()
fs::dir_delete(local_dir)
fs::dir_create(local_dir) # create dir if it doesn't exist
l3 <- SubTreeFileSystem$create(local_dir)
l3$ls() #empty
s3 <- s3_bucket("neon4cast-targets/aquatics", endpoint_override =
"data.ecoforecast.org", anonymous=TRUE)
s3$ls() #not empty, good
copy_files(s3$path("aquatics-targets.csv.gz"),
l3$path("aquatics-targets.csv.gz"))
l3$ls() # darn, nothing!
copy_files(s3$path("aquatics-targets.csv.gz"), l3)
l3$ls() # darn, nothing!
copy_files(s3, l3)
l3$ls() # Finally! only this works
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)