12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace OCA\Files_Sharing\External;
- use OC\ForbiddenException;
- use OCP\Files\NotFoundException;
- use OCP\Files\StorageInvalidException;
- use OCP\Files\StorageNotAvailableException;
- class Scanner extends \OC\Files\Cache\Scanner {
-
- protected $storage;
- public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) {
-
- parent::scan($path, $recursive, $reuse, false);
- }
-
- public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true, $data = null) {
- try {
- return parent::scanFile($file, $reuseExisting, $parentId, $cacheData, $lock, $data);
- } catch (ForbiddenException $e) {
- $this->storage->checkStorageAvailability();
- } catch (NotFoundException $e) {
-
-
-
- $this->storage->checkStorageAvailability();
- } catch (StorageInvalidException $e) {
- $this->storage->checkStorageAvailability();
- } catch (StorageNotAvailableException $e) {
- $this->storage->checkStorageAvailability();
- }
- }
- }
|