public function get_file($url, $file = '') { global $CFG; $path = $this->prepare_file($file); $fp = fopen($path, 'w'); $gdocs = new google_docs(new google_authsub($this->subauthtoken)); $gdocs->download_file($url, $fp); return array('path' => $path, 'url' => $url); }
public function get_file($url, $file = '') { $gdocs = new google_docs($this->googleoauth); $path = $this->prepare_file($file); return $gdocs->download_file($url, $path); }
public function get_file($url, $file = '') { if (empty($url)) { throw new repository_exception('cannotdownload', 'repository'); } $gdocs = new google_docs($this->googleoauth); $path = $this->prepare_file($file); return $gdocs->download_file($url, $path, self::GETFILE_TIMEOUT); }