diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-11-02 14:56:38 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-11-10 10:55:29 +0100 |
commit | 331ef0e3c0a1417f70bf9eb417ec078412d04c5c (patch) | |
tree | 4639fc3d96e28ced7e251e84fa61509dc295e317 /lib/private/files/fileinfo.php | |
parent | 422d29ae48fe0646b1b5b633b205ea146d9ed69f (diff) | |
download | nextcloud-server-331ef0e3c0a1417f70bf9eb417ec078412d04c5c.tar.gz nextcloud-server-331ef0e3c0a1417f70bf9eb417ec078412d04c5c.zip |
Add getOwner to FileInfo
Diffstat (limited to 'lib/private/files/fileinfo.php')
-rw-r--r-- | lib/private/files/fileinfo.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php index cf9524241dd..bb810dd45ed 100644 --- a/lib/private/files/fileinfo.php +++ b/lib/private/files/fileinfo.php @@ -28,6 +28,8 @@ namespace OC\Files; +use OCP\IUser; + class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { /** * @var array $data @@ -55,18 +57,25 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { private $mount; /** + * @var IUser + */ + private $owner; + + /** * @param string|boolean $path * @param Storage\Storage $storage * @param string $internalPath * @param array $data * @param \OCP\Files\Mount\IMountPoint $mount + * @param \OCP\IUser|null $owner */ - public function __construct($path, $storage, $internalPath, $data, $mount) { + public function __construct($path, $storage, $internalPath, $data, $mount, $owner= null) { $this->path = $path; $this->storage = $storage; $this->internalPath = $internalPath; $this->data = $data; $this->mount = $mount; + $this->owner = $owner; } public function offsetSet($offset, $value) { @@ -267,4 +276,13 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { public function getMountPoint() { return $this->mount; } + + /** + * Get the owner of the file + * + * @return \OCP\IUser + */ + public function getOwner() { + return $this->owner; + } } |