diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-02-23 15:26:12 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-02-25 15:09:41 +0100 |
commit | a39c7bf4643fdaa17e62ea503fede1c2f4a30d35 (patch) | |
tree | 15408c60659e1d866d66a9b4f07774897437ee19 /lib/private/command/fileaccess.php | |
parent | 8213f8d67d5a73b43b871d305e911e22b4144f79 (diff) | |
download | nextcloud-server-a39c7bf4643fdaa17e62ea503fede1c2f4a30d35.tar.gz nextcloud-server-a39c7bf4643fdaa17e62ea503fede1c2f4a30d35.zip |
Add FileAccess trait for commands
Diffstat (limited to 'lib/private/command/fileaccess.php')
-rw-r--r-- | lib/private/command/fileaccess.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/private/command/fileaccess.php b/lib/private/command/fileaccess.php new file mode 100644 index 00000000000..5de00862fac --- /dev/null +++ b/lib/private/command/fileaccess.php @@ -0,0 +1,18 @@ +<?php +/** + * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Command; + +use OCP\IUser; + +trait FileAccess { + protected function getUserFolder(IUser $user) { + \OC_Util::setupFS($user->getUID()); + return \OC::$server->getUserFolder($user->getUID()); + } +} |