sbg / sevenbridges-r

Seven Bridges API Client, CWL Schema, Meta Schema, and SDK Helper in R
https://sbg.github.io/sevenbridges-r/
Apache License 2.0
35 stars 14 forks source link

Error: HTTP Status 400: Downloading folders is not supported #81

Open komalsrathi opened 3 years ago

komalsrathi commented 3 years ago

Hi,

I wanted to download all files within a particular project > folder > sub-folders. This is what I am doing:

# Get a project by its id
p <- a$project(id = project_id)

# Get folder of a patient with subfolders that contain files I want to download
f <- p$file(name = patient_folder_name)

> class(f)
[1] "Files"
attr(,"package")
[1] "sevenbridges"

Now I want to retrieve download urls of all files in the object f. However, I get an error:

> f$download()
Error: HTTP Status 400: Downloading folders is not supported.
> f$download_url()
Error: HTTP Status 400: Downloading folders is not supported.

How do I download all files in those subfolders under the object f?