getFile() public method

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