summaryrefslogtreecommitdiffstats
path: root/lib/public/Files
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-08-22 15:44:52 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-10-27 14:35:34 +0200
commit3f0cb130421b4626041d3d60f0bde9e5da9d5dcc (patch)
treea57e37c46c3e3c8bd125f75929402af7d68c325b /lib/public/Files
parent7a4c0c668baef6fe86b6131444cab122a4b3b374 (diff)
downloadnextcloud-server-3f0cb130421b4626041d3d60f0bde9e5da9d5dcc.tar.gz
nextcloud-server-3f0cb130421b4626041d3d60f0bde9e5da9d5dcc.zip
Allow getting the filepath when getting cached mounts by fileid
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/Files')
-rw-r--r--lib/public/Files/Config/ICachedMountFieInfo.php43
-rw-r--r--lib/public/Files/Config/IUserMountCache.php2
2 files changed, 44 insertions, 1 deletions
diff --git a/lib/public/Files/Config/ICachedMountFieInfo.php b/lib/public/Files/Config/ICachedMountFieInfo.php
new file mode 100644
index 00000000000..e884b975503
--- /dev/null
+++ b/lib/public/Files/Config/ICachedMountFieInfo.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 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\Config;
+
+/**
+ * Holds information about a mount for a user
+ *
+ * @since 13.0.0
+ */
+interface ICachedMountFileInfo extends ICachedMountInfo {
+ /**
+ * Return the path for the file within the cached mount
+ *
+ * @return string
+ * @since 13.0.0
+ */
+ public function getInternalPath();
+
+ /**
+ * @return string
+ * @since 13.0.0
+ */
+ public function getPath();
+}
diff --git a/lib/public/Files/Config/IUserMountCache.php b/lib/public/Files/Config/IUserMountCache.php
index fca797d3b69..4529edd8f6c 100644
--- a/lib/public/Files/Config/IUserMountCache.php
+++ b/lib/public/Files/Config/IUserMountCache.php
@@ -73,7 +73,7 @@ interface IUserMountCache {
*
* @param int $fileId
* @param string|null $user optionally restrict the results to a single user @since 12.0.0
- * @return ICachedMountInfo[]
+ * @return ICachedMountFileInfo[]
* @since 9.0.0
*/
public function getMountsForFileId($fileId, $user = null);