예제 #1
0
파일: local.php 프로젝트: ninjasilicon/core
	/**
	 * get the ETag for a file or folder
	 *
	 * @param string $path
	 * @return string
	 */
	public function getETag($path) {
		if ($this->is_file($path)) {
			$stat = $this->stat($path);
			return md5(
				$stat['mtime'] .
				$stat['ino'] .
				$stat['dev'] .
				$stat['size']
			);
		} else {
			return parent::getETag($path);
		}
	}
예제 #2
0
 public function getETag($path)
 {
     if ($path == '') {
         return parent::getETag($path);
     }
     if ($source = $this->getSourcePath($path)) {
         list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);
         return $storage->getETag($internalPath);
     }
     return null;
 }