summaryrefslogtreecommitdiffstats
path: root/lib/private/files/fileinfo.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-12-16 14:24:48 +0100
committerRobin Appelman <icewind@owncloud.com>2014-12-17 14:03:50 +0100
commitfd854247423de0d74b05b44bf16572d2be943819 (patch)
tree9c51dd102bc2f5f318e6081a23e93dd1164b6548 /lib/private/files/fileinfo.php
parent95a145f67f037d5b91ecebc33deaefbb4af96a79 (diff)
downloadnextcloud-server-fd854247423de0d74b05b44bf16572d2be943819.tar.gz
nextcloud-server-fd854247423de0d74b05b44bf16572d2be943819.zip
Add getMountPoint to FileInfo
Diffstat (limited to 'lib/private/files/fileinfo.php')
-rw-r--r--lib/private/files/fileinfo.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php
index 8bab51f0737..e4a397dcca2 100644
--- a/lib/private/files/fileinfo.php
+++ b/lib/private/files/fileinfo.php
@@ -30,14 +30,23 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
private $internalPath;
/**
+ * @var \OCP\Files\Mount\IMountPoint
+ */
+ private $mount;
+
+ /**
* @param string|boolean $path
* @param Storage\Storage $storage
+ * @param string $internalPath
+ * @param array $data
+ * @param \OCP\Files\Mount\IMountPoint $mount
*/
- public function __construct($path, $storage, $internalPath, $data) {
+ public function __construct($path, $storage, $internalPath, $data, $mount) {
$this->path = $path;
$this->storage = $storage;
$this->internalPath = $internalPath;
$this->data = $data;
+ $this->mount = $mount;
}
public function offsetSet($offset, $value) {
@@ -208,6 +217,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
/**
* Check if a file or folder is shared
+ *
* @return bool
*/
public function isShared() {
@@ -229,4 +239,13 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
return false;
}
+
+ /**
+ * Get the mountpoint the file belongs to
+ *
+ * @return \OCP\Files\Mount\IMountPoint
+ */
+ public function getMountPoint() {
+ return $this->mount;
+ }
}