コード例 #1
0
ファイル: changewatcher.php プロジェクト: Kevin-ZK/vaneDisk
 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());
     }
 }
コード例 #2
0
 public function permissionsHook($params)
 {
     $share = $params['share'];
     if ($share['item_type'] === 'file' || $share['item_type'] === 'folder') {
         $this->recipientPropagator->markDirty($share, microtime(true));
     }
 }