LocalRootStorage.php 548 B

12345678910111213141516171819202122
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Files\Storage;
  8. use OC\Files\Cache\LocalRootScanner;
  9. use OCP\Files\Cache\IScanner;
  10. use OCP\Files\Storage\IStorage;
  11. class LocalRootStorage extends Local {
  12. public function getScanner(string $path = '', ?IStorage $storage = null): IScanner {
  13. if (!$storage) {
  14. $storage = $this;
  15. }
  16. return $storage->scanner ?? ($storage->scanner = new LocalRootScanner($storage));
  17. }
  18. }