コード例 #1
0
ファイル: FileRepo.php プロジェクト: whysasse/kmwiki
 /**
  * Checks existence of an array of files.
  *
  * @param array $files Virtual URLs (or storage paths) of files to check
  * @return array Map of files and existence flags, or false
  */
 public function fileExistsBatch(array $files)
 {
     $paths = array_map(array($this, 'resolveToStoragePath'), $files);
     $this->backend->preloadFileStat(array('srcs' => $paths));
     $result = array();
     foreach ($files as $key => $file) {
         $path = $this->resolveToStoragePath($file);
         $result[$key] = $this->backend->fileExists(array('src' => $path));
     }
     return $result;
 }