updateCache() protected method

Put file stat in cache and return it
Author: Dmitry (dio) Levashov
protected updateCache ( string $path, array $stat ) : array
$path string file path
$stat array file stat
return array
コード例 #1
0
ファイル: driver.class.php プロジェクト: nunoluciano/uxcl
	/**
	 * Put file stat in cache and return it
	 *
	 * @param  string  $path   file path
	 * @param  array   $stat   file stat
	 * @return array
	 * @author Dmitry (dio) Levashov
	 **/
	protected function updateCache($path, $stat) {
		$stat = parent::updateCache($path, $stat);
		if ($stat && $stat['mime'] !== 'directory') $stat['_localpath'] = str_replace(XOOPS_ROOT_PATH, 'R', realpath($this->options['filePath'])  . DIRECTORY_SEPARATOR . str_replace($this->options['URL'], '', $stat['url']) );
		return $this->cache[$path] = $stat;
	}
コード例 #2
0
ファイル: driver.class.php プロジェクト: nao-pon/xelfinder
 /**
  * Put file stat in cache and return it
  *
  * @param  string  $path   file path
  * @param  array   $stat   file stat
  * @return array
  * @author Dmitry (dio) Levashov
  **/
 protected function updateCache($path, $stat)
 {
     $path = (int) $path;
     $stat = parent::updateCache($path, $stat);
     if ($stat && !isset($stat['locked'])) {
         $stat['locked'] = 0;
     }
     return $this->cache[$path] = $stat;
 }