aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node/LazyFolder.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Node/LazyFolder.php')
-rw-r--r--lib/private/Files/Node/LazyFolder.php42
1 files changed, 12 insertions, 30 deletions
diff --git a/lib/private/Files/Node/LazyFolder.php b/lib/private/Files/Node/LazyFolder.php
index e30cfea693e..37b1efa0fad 100644
--- a/lib/private/Files/Node/LazyFolder.php
+++ b/lib/private/Files/Node/LazyFolder.php
@@ -1,30 +1,10 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright Copyright (c) 2020 Robin Appelman <robin@icewind.nl>
- *
- * @author Maxence Lange <maxence@artificial-owl.com>
- * @author Robin Appelman <robin@icewind.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\Files\Node;
use OC\Files\Filesystem;
@@ -101,7 +81,7 @@ class LazyFolder implements Folder {
/**
* @inheritDoc
*/
- public function removeListener($scope = null, $method = null, callable $callback = null) {
+ public function removeListener($scope = null, $method = null, ?callable $callback = null) {
$this->__call(__FUNCTION__, func_get_args());
}
@@ -154,9 +134,6 @@ class LazyFolder implements Folder {
$this->__call(__FUNCTION__, func_get_args());
}
- /**
- * @inheritDoc
- */
public function get($path) {
return $this->getRootFolder()->get($this->getFullPath($path));
}
@@ -442,9 +419,6 @@ class LazyFolder implements Folder {
return $this->__call(__FUNCTION__, func_get_args());
}
- /**
- * @inheritDoc
- */
public function nodeExists($path) {
return $this->__call(__FUNCTION__, func_get_args());
}
@@ -492,7 +466,11 @@ class LazyFolder implements Folder {
* @inheritDoc
*/
public function getById($id) {
- return $this->__call(__FUNCTION__, func_get_args());
+ return $this->getRootFolder()->getByIdInPath((int)$id, $this->getPath());
+ }
+
+ public function getFirstNodeById(int $id): ?\OCP\Files\Node {
+ return $this->getRootFolder()->getFirstNodeByIdInPath($id, $this->getPath());
}
/**
@@ -583,4 +561,8 @@ class LazyFolder implements Folder {
public function getMetadata(): array {
return $this->data['metadata'] ?? $this->__call(__FUNCTION__, func_get_args());
}
+
+ public function verifyPath($fileName, $readonly = false): void {
+ $this->__call(__FUNCTION__, func_get_args());
+ }
}