download_revision: Download a specific revision of a Google Drive file

Description Usage Arguments Value

View source: R/revisions.R

Description

download a specific revision of a Google Drive file in a user-specified format, and save it to disk.

Usage

1
2
download_revision(token, metadata = NULL, download_type, destination,
  file_id = NULL, version = NULL, overwrite = TRUE, ...)

Arguments

token

a token, generated with driver_connect.

metadata

a metadata object retrieved from revision_metadata, list_files, or file_metadata. If the latter, version must be supplied

download_type

the format to download the file in. Available formats for a specific file can be found in the "exportLinks" field of a metadata object.

destination

a file path to write the downloaded file to.

file_id

the ID of a file - or the full URL for accessing it via your browser. May be provided in place of metadata. If used, version must be supplied

version

The version number of a google doc (found in the "id" of version metadata) or a date value that can be coerced to POSIXct. If a date/time is provided, the last version saved prior to that time is returned.

overwrite

whether to overwrite any existing file at destination. Set to TRUE by default.

...

any further arguments to pass to httr's GET.

Value

TRUE if the file could be downloaded, FALSE or an error otherwise.


noamross/driver documentation built on May 23, 2019, 9:30 p.m.