Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-03-08 17:50:25 +0300
committerGitHub <noreply@github.com>2022-03-08 17:50:25 +0300
commite8872f01ae850bcbf66220beba44463f68e3d673 (patch)
tree9b2b1d01992d26368ff456af0440d0a2965308a6 /lib/public
parent23e8ae15aaea30359a927492155de13c97b311ce (diff)
parent917c74e214094e321ff96e1aa067ae60d22e2c58 (diff)
Merge pull request #31431 from nextcloud/fs-setup-manager
Unify/cleanup filesystem setup
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Files/Config/ICachedMountFileInfo.php4
-rw-r--r--lib/public/Files/Config/ICachedMountInfo.php16
-rw-r--r--lib/public/Files/Events/Node/FilesystemTornDownEvent.php34
-rw-r--r--lib/public/Files/Mount/IMountManager.php14
4 files changed, 51 insertions, 17 deletions
diff --git a/lib/public/Files/Config/ICachedMountFileInfo.php b/lib/public/Files/Config/ICachedMountFileInfo.php
index 4de0a1218b4..e6aa2ec38c8 100644
--- a/lib/public/Files/Config/ICachedMountFileInfo.php
+++ b/lib/public/Files/Config/ICachedMountFileInfo.php
@@ -34,11 +34,11 @@ interface ICachedMountFileInfo extends ICachedMountInfo {
* @return string
* @since 13.0.0
*/
- public function getInternalPath();
+ public function getInternalPath(): string;
/**
* @return string
* @since 13.0.0
*/
- public function getPath();
+ public function getPath(): string;
}
diff --git a/lib/public/Files/Config/ICachedMountInfo.php b/lib/public/Files/Config/ICachedMountInfo.php
index 812e79cdbc8..dafd2423fdc 100644
--- a/lib/public/Files/Config/ICachedMountInfo.php
+++ b/lib/public/Files/Config/ICachedMountInfo.php
@@ -35,31 +35,31 @@ interface ICachedMountInfo {
* @return IUser
* @since 9.0.0
*/
- public function getUser();
+ public function getUser(): IUser;
/**
* @return int the numeric storage id of the mount
* @since 9.0.0
*/
- public function getStorageId();
+ public function getStorageId(): int;
/**
* @return int the fileid of the root of the mount
* @since 9.0.0
*/
- public function getRootId();
+ public function getRootId(): int;
/**
- * @return Node the root node of the mount
+ * @return Node|null the root node of the mount
* @since 9.0.0
*/
- public function getMountPointNode();
+ public function getMountPointNode(): ?Node;
/**
* @return string the mount point of the mount for the user
* @since 9.0.0
*/
- public function getMountPoint();
+ public function getMountPoint(): string;
/**
* Get the id of the configured mount
@@ -67,7 +67,7 @@ interface ICachedMountInfo {
* @return int|null mount id or null if not applicable
* @since 9.1.0
*/
- public function getMountId();
+ public function getMountId(): ?int;
/**
* Get the internal path (within the storage) of the root of the mount
@@ -75,7 +75,7 @@ interface ICachedMountInfo {
* @return string
* @since 11.0.0
*/
- public function getRootInternalPath();
+ public function getRootInternalPath(): string;
/**
* Get the class of the mount provider that this mount originates from
diff --git a/lib/public/Files/Events/Node/FilesystemTornDownEvent.php b/lib/public/Files/Events/Node/FilesystemTornDownEvent.php
new file mode 100644
index 00000000000..3e7780c827e
--- /dev/null
+++ b/lib/public/Files/Events/Node/FilesystemTornDownEvent.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2022 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/>.
+ *
+ */
+
+namespace OCP\Files\Events\Node;
+
+use OCP\EventDispatcher\Event;
+
+/**
+ * Event fired after the filesystem has been torn down
+ *
+ * @since 24.0.0
+ */
+class FilesystemTornDownEvent extends Event {
+}
diff --git a/lib/public/Files/Mount/IMountManager.php b/lib/public/Files/Mount/IMountManager.php
index 1e8c674f8f5..aa760f53e96 100644
--- a/lib/public/Files/Mount/IMountManager.php
+++ b/lib/public/Files/Mount/IMountManager.php
@@ -37,7 +37,7 @@ interface IMountManager {
/**
* Add a new mount
*
- * @param \OCP\Files\Mount\IMountPoint $mount
+ * @param IMountPoint $mount
* @since 8.2.0
*/
public function addMount(IMountPoint $mount);
@@ -63,16 +63,16 @@ interface IMountManager {
* Find the mount for $path
*
* @param string $path
- * @return \OCP\Files\Mount\IMountPoint|null
+ * @return IMountPoint
* @since 8.2.0
*/
- public function find(string $path);
+ public function find(string $path): ?IMountPoint;
/**
* Find all mounts in $path
*
* @param string $path
- * @return \OCP\Files\Mount\IMountPoint[]
+ * @return IMountPoint[]
* @since 8.2.0
*/
public function findIn(string $path): array;
@@ -88,13 +88,13 @@ interface IMountManager {
* Find mounts by storage id
*
* @param string $id
- * @return \OCP\Files\Mount\IMountPoint[]
+ * @return IMountPoint[]
* @since 8.2.0
*/
public function findByStorageId(string $id): array;
/**
- * @return \OCP\Files\Mount\IMountPoint[]
+ * @return IMountPoint[]
* @since 8.2.0
*/
public function getAll(): array;
@@ -103,7 +103,7 @@ interface IMountManager {
* Find mounts by numeric storage id
*
* @param int $id
- * @return \OCP\Files\Mount\IMountPoint[]
+ * @return IMountPoint[]
* @since 8.2.0
*/
public function findByNumericId(int $id): array;