public function writeHook($params) { $path = $params['path']; $fullPath = $this->baseView->getAbsolutePath($path); $mount = $this->baseView->getMount($path); if ($mount instanceof SharedMount) { $this->propagateForOwner($mount->getShare(), $mount->getInternalPath($fullPath), $mount->getOwnerPropagator()); } $info = $this->baseView->getFileInfo($path); if ($info) { // trigger propagation if the subject of the write hook is shared. // if a parent folder of $path is shared the propagation will be triggered from the change propagator hooks $this->recipientPropagator->propagateById($info->getId()); } }
public function permissionsHook($params) { $share = $params['share']; if ($share['item_type'] === 'file' || $share['item_type'] === 'folder') { $this->recipientPropagator->markDirty($share, microtime(true)); } }