예제 #1
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() . '"');
     }
 }