コード例 #1
0
 public function doTestGetLocalCopyAndReference404()
 {
     $backendName = $this->backendClass();
     $base = self::baseStorePath();
     $tmpFile = $this->backend->getLocalCopy(array('src' => "{$base}/unittest-cont1/not-there"));
     $this->assertEquals(null, $tmpFile, "Local copy of not existing file is null ({$backendName}).");
     $tmpFile = $this->backend->getLocalReference(array('src' => "{$base}/unittest-cont1/not-there"));
     $this->assertEquals(null, $tmpFile, "Local ref of not existing file is null ({$backendName}).");
 }
コード例 #2
0
ファイル: FileRepo.php プロジェクト: Tjorriemorrie/app
 /**
  * Get a local FS copy of a file with a given virtual URL/storage path.
  * Temporary files may be purged when the file object falls out of scope.
  *
  * @param $virtualUrl string
  * @return TempFSFile|null Returns null on failure
  */
 public function getLocalCopy($virtualUrl)
 {
     $path = $this->resolveToStoragePath($virtualUrl);
     return $this->backend->getLocalCopy(array('src' => $path));
 }