dwww Home | Show directory contents | Find package

# drive_download() won't overwrite existing file

    Code
      withr::with_dir(tmpdir, drive_download(dribble(), path = precious_filepath))
    Error <rlang_error>
      Local `path` already exists and overwrite is `FALSE`:
      * 'precious-TEST-drive_download.txt'

# drive_download() downloads a file and adds local_path column

    Code
      write_utf8(drive_download_message)
    Output
      File downloaded:
      * '{file_to_download}' <id: {FILE_ID}>
      Saved locally as:
      * '{download_filepath}'

# drive_download() errors if file does not exist on Drive

    Code
      drive_download(nm_("this-should-not-exist"))
    Error <rlang_error>
      `file` does not identify at least one Drive file.

# drive_download() converts with explicit `type`

    Code
      write_utf8(drive_download_message)
    Output
      File downloaded:
      * '{file_to_download}' <id: {FILE_ID}>
      Saved locally as:
      * '{download_filename}'

# drive_download() converts with type implicit in `path`

    Code
      write_utf8(drive_download_message)
    Output
      File downloaded:
      * '{file_to_download}' <id: {FILE_ID}>
      Saved locally as:
      * '{download_filename}'

# drive_download() converts using default MIME type, if necessary

    Code
      write_utf8(drive_download_message)
    Output
      File downloaded:
      * '{file_to_download}' <id: {FILE_ID}>
      Saved locally as:
      * '{download_filename}'

Generated by dwww version 1.15 on Sun Jun 23 15:36:06 CEST 2024.