/** * @param string $path * @param \OC\Files\Storage\Storage $storage * @return \OCA\Files_Sharing\External\Scanner */ public function getScanner($path = '', $storage = null) { if (!$storage) { $storage = $this; } if (!$this->remoteIsOwnCloud()) { return parent::getScanner($path, $storage); } if (!isset($this->scanner)) { $this->scanner = new Scanner($storage); } return $this->scanner; }