aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/home.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-21 12:17:47 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-21 12:17:47 +0100
commit69e8e7dbd5039652cceb078025248c308ffd0d55 (patch)
tree754057f2db112e38f98c0b601be776d28a9564fb /lib/private/files/storage/home.php
parent356eef07398f8829a2558eee809599be60441b59 (diff)
downloadnextcloud-server-69e8e7dbd5039652cceb078025248c308ffd0d55.tar.gz
nextcloud-server-69e8e7dbd5039652cceb078025248c308ffd0d55.zip
Now using the "Home" storage detection approach for quota
To find out whether to apply a quota, we now try and detect whether the storage to wrap is a "Home" storage.
Diffstat (limited to 'lib/private/files/storage/home.php')
-rw-r--r--lib/private/files/storage/home.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/private/files/storage/home.php b/lib/private/files/storage/home.php
index b4ceb8f4f9b..1c2a682f197 100644
--- a/lib/private/files/storage/home.php
+++ b/lib/private/files/storage/home.php
@@ -22,6 +22,12 @@ class Home extends Local {
*/
protected $user;
+ /**
+ * @brief Construct a Home storage instance
+ * @param array $arguments array with "user" containing the
+ * storage owner and "legacy" containing "true" if the storage is
+ * a legacy storage with "local::" URL instead of the new "home::" one.
+ */
public function __construct($arguments) {
$this->user = $arguments['user'];
$datadir = $this->user->getHome();
@@ -40,10 +46,21 @@ class Home extends Local {
return $this->id;
}
+ /**
+ * @return \OC\Files\Cache\HomeCache
+ */
public function getCache($path = '') {
if (!isset($this->cache)) {
$this->cache = new \OC\Files\Cache\HomeCache($this);
}
return $this->cache;
}
+
+ /**
+ * @brief Returns the owner of this home storage
+ * @return \OC\User\User owner of this home storage
+ */
+ public function getUser() {
+ return $this->user;
+ }
}