public static function getRealFSReference($path) { $tmpFile = AJXP_Utils::getAjxpTmpDir() . "/" . rand(); $path = self::staticInitPath($path); file_put_contents($tmpFile, self::$dropbox->getFile($path)); return $tmpFile; }
/** * @param \Dropbox_API $dropbox */ function it_does_not_read_file($dropbox) { $dropbox->getFile('filename')->willThrow(new \Dropbox_Exception_NotFound()); $this->read('filename')->shouldReturn(false); }
/** * Returns a file's contents * * @param string $path path * @param string $root Use this to override the default root path (sandbox/dropbox) * @return string */ public function getFile($path = '', $root = null) { return $this->dropbox->getFile($path, $root); }