Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read files from public links #26

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

tarensanders
Copy link
Collaborator

Makes it possible to read in files from public links, with and without a password.

Fixes #25

tarensanders and others added 6 commits August 18, 2022 14:31
Removed name of the function from function descriptions (redundant).
Reran styler which made some minor changes to layout.
This more closely aligns with 'best practice' for packages.
Now returns the public path when required.
@tarensanders
Copy link
Collaborator Author

tarensanders commented Aug 25, 2022

I think this probably needs a vignette to cover how to use it. I'll add that before it gets merged.

Things to note in vignette:

  • I tried really hard not to break the existing API, and all of the previous tests work with no alterations, so I think I managed it
  • You can only read from folders, cloud_put() could be updated but I don't think it's a priority
  • To use you just pass the full URL as the path argument to cloud_get(), and the password if the URL needs one.
  • Because the returned data doesn't include the filename, it can't be automatically opened with {rio}. You get a warning if open_file = TRUE (the default), and it will just return the file path instead.
  • It works for folders too, but is not recursive (it will download only files at the top level). Downloads all files it finds and returns a vector of file paths.
  • It will detect if a URL is for a file or a folder, you don't need to specify.

TODO:

  • Vignette
  • Update version & news

@tarensanders tarensanders marked this pull request as draft August 25, 2022 03:55
@tarensanders tarensanders self-assigned this Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Public file access in R
1 participant