aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Files/FileInfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Files/FileInfo.php')
-rw-r--r--lib/public/Files/FileInfo.php54
1 files changed, 26 insertions, 28 deletions
diff --git a/lib/public/Files/FileInfo.php b/lib/public/Files/FileInfo.php
index 14edf6a7645..f9957f580e8 100644
--- a/lib/public/Files/FileInfo.php
+++ b/lib/public/Files/FileInfo.php
@@ -1,30 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Felix Heidecke <felix@heidecke.me>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Julius Härtl <jus@bitgrid.net>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCP\Files;
@@ -84,7 +63,7 @@ interface FileInfo {
* Get the size in bytes for the file or folder
*
* @param bool $includeMounts whether or not to include the size of any sub mounts, since 16.0.0
- * @return int
+ * @return int|float
* @since 7.0.0
*/
public function getSize($includeMounts = true);
@@ -154,7 +133,9 @@ interface FileInfo {
public function getId();
/**
- * Check whether the file is encrypted
+ * Check whether the node is encrypted.
+ * If it is a file, then it is server side encrypted.
+ * If it is a folder, then it is end-to-end encrypted.
*
* @return bool
* @since 7.0.0
@@ -250,7 +231,7 @@ interface FileInfo {
/**
* Get the owner of the file
*
- * @return \OCP\IUser
+ * @return ?\OCP\IUser
* @since 9.0.0
*/
public function getOwner();
@@ -299,4 +280,21 @@ interface FileInfo {
* @since 18.0.0
*/
public function getUploadTime(): int;
+
+ /**
+ * Get the fileid or the parent folder
+ * or -1 if this item has no parent folder (because it is the root)
+ *
+ * @return int
+ * @since 28.0.0
+ */
+ public function getParentId(): int;
+
+ /**
+ * Get the metadata, if available
+ *
+ * @return array<string, int|string|bool|float|string[]|int[]>
+ * @since 28.0.0
+ */
+ public function getMetadata(): array;
}