diff options
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r-- | lib/private/Share20/Manager.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 22cf5a3f65a..f2f4acf8d00 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -34,6 +34,7 @@ use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountManager; +use OCP\Files\Node; use OCP\Files\NotFoundException; use OCP\IConfig; use OCP\IGroupManager; @@ -48,6 +49,7 @@ use OCP\Share\IManager; use OCP\Share\IProviderFactory; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\GenericEvent; +use OCP\Share\IShareProvider; /** * This class is the communication hub for all sharing related operations. @@ -881,6 +883,14 @@ class Manager implements IManager { $provider->move($share, $recipientId); } + public function getSharesInFolder($userId, Node $node, $reshares = false) { + $providers = $this->factory->getAllProviders(); + + return array_reduce($providers, function($shares, IShareProvider $provider) use ($userId, $node, $reshares) { + return $shares + $provider->getSharesInFolder($userId, $node, $reshares); + }, []); + } + /** * @inheritdoc */ |