namespace OC\Files\Node;
-
use OCP\Constants;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
public function __construct(IRootFolder $rootFolder, IUser $user) {
$this->rootFolder = $rootFolder;
$this->user = $user;
- parent::__construct(function() use ($user) {
+ parent::__construct(function () use ($user) {
try {
return $this->rootFolder->get('/' . $user->getUID() . '/files');
} catch (NotFoundException $e) {
public function get($path) {
return $this->rootFolder->get('/' . $this->user->getUID() . '/files/' . rtrim($path, '/'));
}
-
-
}
use OC\Files\View;
use OC\Hooks\PublicEmitter;
use OC\User\NoUserException;
-use OCP\Constants;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Events\Node\FilesystemTornDownEvent;
];
foreach ($genericEvents as $genericEvent) {
- $this->eventDispatcher->addListener($genericEvent, function($event) {
+ $this->eventDispatcher->addListener($genericEvent, function ($event) {
$this->cache->clear();
});
}