示例#1
0
 /**
  * @param File|Folder $path
  */
 protected function pathCreateChecks($path)
 {
     // Make sure that we do not share a path that contains a shared mountpoint
     if ($path instanceof \OCP\Files\Folder) {
         $mounts = $this->mountManager->findIn($path->getPath());
         foreach ($mounts as $mount) {
             if ($mount->getStorage()->instanceOfStorage('\\OCA\\Files_Sharing\\ISharedStorage')) {
                 throw new \InvalidArgumentException('Path contains files shared with you');
             }
         }
     }
 }