ISimpleRoot.php 881 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Files\SimpleFS;
  7. use OCP\Files\NotFoundException;
  8. use OCP\Files\NotPermittedException;
  9. /**
  10. * Interface ISimpleRoot
  11. *
  12. * @since 11.0.0
  13. */
  14. interface ISimpleRoot {
  15. /**
  16. * Get the folder with name $name
  17. *
  18. * @throws NotFoundException
  19. * @throws \RuntimeException
  20. * @since 11.0.0
  21. */
  22. public function getFolder(string $name): ISimpleFolder;
  23. /**
  24. * Get all the Folders
  25. *
  26. * @return ISimpleFolder[]
  27. * @throws NotFoundException
  28. * @throws \RuntimeException
  29. * @since 11.0.0
  30. */
  31. public function getDirectoryListing(): array;
  32. /**
  33. * Create a new folder named $name
  34. *
  35. * @throws NotPermittedException
  36. * @throws \RuntimeException
  37. * @since 11.0.0
  38. */
  39. public function newFolder(string $name): ISimpleFolder;
  40. }