diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-02-28 14:14:20 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-03 10:52:34 +0200 |
commit | 4393b96542be6b0495d93cf9ed87e9b51b36121f (patch) | |
tree | f23cb5b2ef04edf7f16eecd6035545f1098dc9e8 | |
parent | 966a3e696335d9dad2cc8dfa2ec44d44298626ff (diff) | |
download | nextcloud-server-4393b96542be6b0495d93cf9ed87e9b51b36121f.tar.gz nextcloud-server-4393b96542be6b0495d93cf9ed87e9b51b36121f.zip |
Remove unused method getLocalFolder
It’s not used and not in any OCP interface/class.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/encryption/tests/Command/FixEncryptedVersionTest.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Filesystem.php | 8 | ||||
-rw-r--r-- | lib/private/Files/Storage/FailedStorage.php | 4 | ||||
-rw-r--r-- | lib/private/Files/Storage/Local.php | 4 | ||||
-rw-r--r-- | lib/private/Files/View.php | 14 | ||||
-rw-r--r-- | tests/lib/Files/ViewTest.php | 1 |
6 files changed, 1 insertions, 32 deletions
diff --git a/apps/encryption/tests/Command/FixEncryptedVersionTest.php b/apps/encryption/tests/Command/FixEncryptedVersionTest.php index 5c938b4350d..2a6c86ef5b2 100644 --- a/apps/encryption/tests/Command/FixEncryptedVersionTest.php +++ b/apps/encryption/tests/Command/FixEncryptedVersionTest.php @@ -263,7 +263,7 @@ Fixed the file: \"/$this->userId/files/world.txt\" with version 4", $output); $cacheInfo = ['encryptedVersion' => 1, 'encrypted' => 1]; $cache1->put($fileCache1->getPath(), $cacheInfo); - $absPath = $view->getLocalFolder(''). '/hello.txt'; + $absPath = $storage1->getSourcePath('').$fileInfo1->getInternalPath(); // create unencrypted file on disk, the version stays file_put_contents($absPath, 'hello contents'); 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 @@ -429,14 +429,6 @@ class Filesystem { } /** - * @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 * * @param string $path 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 @@ -235,20 +235,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 * for \OC\Files\Storage\Storage via basicOperation(). diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index b17eeea83c0..18a6fca05b0 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -1096,7 +1096,6 @@ class ViewTest extends \Test\TestCase { ['getMountPoint'], ['resolvePath'], ['getLocalFile'], - ['getLocalFolder'], ['mkdir'], ['rmdir'], ['opendir'], |