Skip to contents

Lists the publicly retrievable bitstreams of one or more PsychArchives items via the DSpace REST API, without downloading them. Each row carries an absolute file_url (the bitstream retrieve endpoint) so the actual bytes are fetched later by download_repo_files(), the same deferred path used for Zenodo and OSF. Restricted files are omitted by the API and never appear here.

Usage

psycharchives_file_download(pa_url, pb = NULL, cache = FALSE)

Arguments

pa_url

a vector of PsychArchives URLs

pb

a progress bar passed from another function

cache

if TRUE, reuse a cached listing from a prior call for the same item instead of re-querying PsychArchives (see repo_info_cache_clear()); default FALSE

Value

a data frame of file information (one row per public bitstream)

Examples

# \donttest{
if (online("www.psycharchives.org")) {
  # lists the public files, which download_repo_files() can then fetch
  psycharchives_file_download("https://hdl.handle.net/20.500.12034/17526")
}
#>                                      pa_url       name
#> 1 https://hdl.handle.net/20.500.12034/17526 readme.txt
#>                                                                                      file_url
#> 1 https://www.psycharchives.org/rest/bitstreams/112719a3-3346-447a-96dc-e253af34a9b3/retrieve
#>   file_location size isdir ext type
#> 1          <NA> 4644 FALSE txt text
# }