Skip to content
Prev Previous commit
Next Next commit
Remove unused functions
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Aug 15, 2022
commit 8aac67ef54f6b8f4e75adac20b2869b7972c77c1
35 changes: 0 additions & 35 deletions lib/ViewInfoCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,6 @@ public function __construct(View $view, IRootFolder $rootFolder) {
$this->rootFolder = $rootFolder;
}

/**
* @param string $user
* @param string $path
* @return array
*/
public function getInfoByPath($user, $path) {
if (isset($this->cachePath[$user][$path])) {
return $this->cachePath[$user][$path];
}

return $this->findInfoByPath($user, $path);
}

/**
* @param string $user
* @param int $fileId
Expand All @@ -80,35 +67,13 @@ public function getInfoById($user, $fileId, $path) {
return $this->findInfoById($user, $fileId, $path);
}

/**
* @param string $user
* @param string $path
* @return array
*/
protected function findInfoByPath($user, $path) {
$this->view->chroot('/' . $user . '/files');

$exists = $this->view->file_exists($path);

$this->cachePath[$user][$path] = [
'path' => $path,
'exists' => $exists,
'is_dir' => $exists ? (bool)$this->view->is_dir($path) : false,
'view' => '',
];

return $this->cachePath[$user][$path];
}

/**
* @param string $user
* @param int $fileId
* @param string $filePath
* @return array
*/
protected function findInfoById($user, $fileId, $filePath) {
$this->view->chroot('/' . $user . '/files');

$cache = [
'path' => $filePath,
'exists' => false,
Expand Down