aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Storage/Common.php2
-rw-r--r--lib/private/Files/Storage/Storage.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Availability.php4
-rw-r--r--lib/private/Files/Storage/Wrapper/Jail.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Wrapper.php2
5 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 6fe647a6add..3a2b819fc44 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -762,7 +762,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage,
return $count;
}
- public function getDirectoryContent($directory): \Traversable|false {
+ public function getDirectoryContent($directory): \Traversable {
$dh = $this->opendir($directory);
if ($dh === false) {
diff --git a/lib/private/Files/Storage/Storage.php b/lib/private/Files/Storage/Storage.php
index 741100ca117..3b14b1b84e3 100644
--- a/lib/private/Files/Storage/Storage.php
+++ b/lib/private/Files/Storage/Storage.php
@@ -72,5 +72,5 @@ interface Storage extends IStorage, ILockingStorage {
* - storage_mtime
* - permissions
*/
- public function getDirectoryContent($directory): \Traversable|false;
+ public function getDirectoryContent($directory): \Traversable;
}
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php
index a29239d034b..1a2824614c1 100644
--- a/lib/private/Files/Storage/Wrapper/Availability.php
+++ b/lib/private/Files/Storage/Wrapper/Availability.php
@@ -438,13 +438,13 @@ class Availability extends Wrapper {
- public function getDirectoryContent($directory): \Traversable|false {
+ public function getDirectoryContent($directory): \Traversable {
$this->checkAvailability();
try {
return parent::getDirectoryContent($directory);
} catch (StorageNotAvailableException $e) {
$this->setUnavailable($e);
- return false;
+ return new \EmptyIterator();
}
}
}
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php
index d0cf1c42236..256d669ede7 100644
--- a/lib/private/Files/Storage/Wrapper/Jail.php
+++ b/lib/private/Files/Storage/Wrapper/Jail.php
@@ -262,7 +262,7 @@ class Jail extends Wrapper {
}
}
- public function getDirectoryContent($directory): \Traversable|false {
+ public function getDirectoryContent($directory): \Traversable {
return $this->getWrapperStorage()->getDirectoryContent($this->getUnjailedPath($directory));
}
}
diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php
index 655bbc7ef75..903f6e5e470 100644
--- a/lib/private/Files/Storage/Wrapper/Wrapper.php
+++ b/lib/private/Files/Storage/Wrapper/Wrapper.php
@@ -331,7 +331,7 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
}
}
- public function getDirectoryContent($directory): \Traversable|false {
+ public function getDirectoryContent($directory): \Traversable {
return $this->getWrapperStorage()->getDirectoryContent($directory);
}