Skip to content

Read files from public links#26

Draft
tarensanders wants to merge 6 commits into
masterfrom
tarensanders/issue25
Draft

Read files from public links#26
tarensanders wants to merge 6 commits into
masterfrom
tarensanders/issue25

Conversation

@tarensanders

Copy link
Copy Markdown
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

tarensanders commented Aug 25, 2022

Copy link
Copy Markdown
Collaborator Author

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