Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function testRepairUnencryptedFileWhenVersionIsSet() {
$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');
Expand Down
8 changes: 0 additions & 8 deletions lib/private/Files/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,6 @@ public static function getLocalFile($path) {
return self::$defaultInstance->getLocalFile($path);
}

/**
* @param string $path
* @return string
*/
public static function getLocalFolder($path) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return self::$defaultInstance->getLocalFolder($path);
}

/**
* return path to file which reflects one visible in browser
*
Expand Down
4 changes: 0 additions & 4 deletions lib/private/Files/Storage/FailedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ public function getLocalFile($path) {
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);
}
Expand Down
4 changes: 0 additions & 4 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,6 @@ public function getLocalFile($path) {
return $this->getSourcePath($path);
}

public function getLocalFolder($path) {
return $this->getSourcePath($path);
}

/**
* @param string $query
* @param string $dir
Expand Down
14 changes: 0 additions & 14 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,6 @@ public function getLocalFile($path): string|bool {
}
}

/**
* @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
Expand Down
1 change: 0 additions & 1 deletion tests/lib/Files/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,6 @@ public function tooLongPathDataProvider() {
['getMountPoint'],
['resolvePath'],
['getLocalFile'],
['getLocalFolder'],
['mkdir'],
['rmdir'],
['opendir'],
Expand Down