Closed jbullock35 closed 4 years ago
I see that I just needed to use the recurse
argument when calling osf_download()
. This code works as expected:
osf_retrieve_node("66gf4") %>%
osf_ls_files(pattern = "Experiment 2") %>%
osf_download(recurse = TRUE)
I am using osfr 0.2.8. I find that
osf_download()
is able to download the contents of folders in some cases but not in others. The problem seems like a bug, but I may just be missing something.Here is a minimal example. We are examining a project that has multiple folders in its root directory. I want to download only the "Experiment 2" folder, which itself contains other folders. That is, I want
osf_download()
to create an "Experiment 2" folder on my computer that is a copy of the one on the OSF site. Butdoesn't work. Instead, I get only this output:
By contrast, this code does work
but it isn't what I want, because it downloads only the folders in the "Experiment 2" folder, rather than the "Experiment 2" folder itself.
This issue seems related to, but distinct from, #86. Is it a bug, or is this the expected functionality?