You are here

public function BackupMigrateDropboxAPI::file_download in Backup and Migrate Dropbox 7.3

Same name and namespace in other branches
  1. 7.2 backup_migrate_dropbox.dropbox_api.inc \BackupMigrateDropboxAPI::file_download()

Downloads the file from the given Dropbox $path.

@link https://www.dropbox.com/developers/documentation/http/documentation#file... Dropbox API /download

Parameters

string $path: Path of file to download.

Return value

string The contents of the requested file.

Throws

RuntimeException

File

./backup_migrate_dropbox.dropbox_api.inc, line 316

Class

BackupMigrateDropboxAPI
BackupMigrateDropboxAPI contains all the details about the Dropbox api, authorization calls, endpoints, uris, parameters, error handling, and split requests for large uploads/downloads

Code

public function file_download($path) {
  $parameters = [
    'path' => $path,
  ];
  return $this
    ->send_message('content', 'files/download', $parameters);
}