Переглянути джерело

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>
tags/v27.0.0beta1
Côme Chilliet 1 рік тому
джерело
коміт
4393b96542
Аккаунт користувача з таким Email не знайдено

+ 1
- 1
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');

+ 0
- 8
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
*

+ 0
- 4
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);
}

+ 0
- 4
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

+ 0
- 14
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

+ 0
- 1
tests/lib/Files/ViewTest.php Переглянути файл

@@ -1096,7 +1096,6 @@ class ViewTest extends \Test\TestCase {
['getMountPoint'],
['resolvePath'],
['getLocalFile'],
['getLocalFolder'],
['mkdir'],
['rmdir'],
['opendir'],

Завантаження…
Відмінити
Зберегти