You are here

public function dropbox::restore in Dropbox Client 7.4

Same name and namespace in other branches
  1. 7 dropbox.php \dropbox::restore()
  2. 7.2 dropbox.php \dropbox::restore()
  3. 7.3 dropbox.php \dropbox::restore()

Restore a file or folder to a previous revision.

Parameters

string $path The path to the file or folder in question:

string $revision The rev hash to revert to.:

string $root (optional) Either 'dropbox' or 'sandbox':

Return value

a response object

File

./dropbox.php, line 272

Class

dropbox

Code

public function restore($path, $revision, $root = 'dropbox') {
  $path = str_replace(' ', '%20', $path);
  return $this
    ->_post_request("/restore/{$root}/{$path}?rev={$revision}");
}