From 4393b96542be6b0495d93cf9ed87e9b51b36121f Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 28 Feb 2023 14:14:20 +0100 Subject: Remove unused method getLocalFolder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s not used and not in any OCP interface/class. Signed-off-by: Côme Chilliet --- lib/private/Files/Filesystem.php | 8 -------- lib/private/Files/Storage/FailedStorage.php | 4 ---- lib/private/Files/Storage/Local.php | 4 ---- lib/private/Files/View.php | 14 -------------- 4 files changed, 30 deletions(-) (limited to 'lib') diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index 7067ddf4a95..ee8db5b4353 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -428,14 +428,6 @@ class Filesystem { return self::$defaultInstance->getLocalFile($path); } - /** - * @param string $path - * @return string - */ - public static function getLocalFolder($path) { - return self::$defaultInstance->getLocalFolder($path); - } - /** * return path to file which reflects one visible in browser * diff --git a/lib/private/Files/Storage/FailedStorage.php b/lib/private/Files/Storage/FailedStorage.php index ceb802570bf..07b3b21d965 100644 --- a/lib/private/Files/Storage/FailedStorage.php +++ b/lib/private/Files/Storage/FailedStorage.php @@ -164,10 +164,6 @@ class FailedStorage extends Common { throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e); } - public function getLocalFolder($path) { - throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e); - } - public function hasUpdated($path, $time) { throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e); } diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 1ff733e0d92..448346e5622 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -433,10 +433,6 @@ class Local extends \OC\Files\Storage\Common { return $this->getSourcePath($path); } - public function getLocalFolder($path) { - return $this->getSourcePath($path); - } - /** * @param string $query * @param string $dir diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 2a6b34f2de6..4ee44b995b3 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -234,20 +234,6 @@ class View { } } - /** - * @param string $path - */ - public function getLocalFolder($path): string|bool { - $parent = substr($path, 0, strrpos($path, '/') ?: 0); - $path = $this->getAbsolutePath($path); - [$storage, $internalPath] = Filesystem::resolvePath($path); - if (Filesystem::isValidPath($parent) and $storage) { - return $storage->getLocalFolder($internalPath); - } else { - return false; - } - } - /** * the following functions operate with arguments and return values identical * to those of their PHP built-in equivalents. Mostly they are merely wrappers -- cgit v1.2.3