Beispiel #1
0
 public function scanAll()
 {
     $data = $this->storage->getShareInfo();
     if ($data['status'] === 'success') {
         $this->addResult($data['data'], '');
     } else {
         throw new \Exception('Error while scanning remote share');
     }
 }
Beispiel #2
0
 /**
  * Checks the remote share for changes.
  * If changes are available, scan them and update
  * the cache.
  * @throws NotFoundException
  * @throws StorageInvalidException
  * @throws \Exception
  */
 public function scanAll()
 {
     try {
         $data = $this->storage->getShareInfo();
     } catch (\Exception $e) {
         $this->storage->checkStorageAvailability();
         throw new \Exception('Error while scanning remote share: "' . $this->storage->getRemote() . '" ' . $e->getMessage());
     }
     if ($data['status'] === 'success') {
         $this->addResult($data['data'], '');
     } else {
         throw new \Exception('Error while scanning remote share: "' . $this->storage->getRemote() . '"');
     }
 }