1
0

IRootFolder.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Bernhard Posselt <dev@bernhard-posselt.com>
  6. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  7. * @author Julius Härtl <jus@bitgrid.net>
  8. * @author Morris Jobke <hey@morrisjobke.de>
  9. *
  10. * @license AGPL-3.0
  11. *
  12. * This code is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU Affero General Public License, version 3,
  14. * as published by the Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License, version 3,
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>
  23. *
  24. */
  25. namespace OCP\Files;
  26. use OC\Hooks\Emitter;
  27. use OC\User\NoUserException;
  28. use OCP\Files\Cache\ICacheEntry;
  29. use OCP\Files\Mount\IMountPoint;
  30. use OCP\Files\Node as INode;
  31. /**
  32. * Interface IRootFolder
  33. *
  34. * @since 8.0.0
  35. */
  36. interface IRootFolder extends Folder, Emitter {
  37. /**
  38. * Returns a view to user's files folder
  39. *
  40. * @param string $userId user ID
  41. * @return Folder
  42. * @throws NoUserException
  43. * @throws NotPermittedException
  44. *
  45. * @since 8.2.0
  46. */
  47. public function getUserFolder($userId);
  48. /**
  49. * Get a file or folder by fileid, inside a parent path
  50. *
  51. * @param int $id
  52. * @param string $path
  53. * @return Node[]
  54. *
  55. * @since 24.0.0
  56. */
  57. public function getByIdInPath(int $id, string $path);
  58. /**
  59. * @return IMountPoint[]
  60. *
  61. * @since 28.0.0
  62. */
  63. public function getMountsIn(string $mountPoint): array;
  64. /**
  65. * Create a `Node` for a file or folder from the cache entry and mountpoint
  66. *
  67. * @param ICacheEntry $cacheEntry
  68. * @param IMountPoint $mountPoint
  69. * @return Node
  70. * @since 28.0.0
  71. */
  72. public function getNodeFromCacheEntryAndMount(ICacheEntry $cacheEntry, IMountPoint $mountPoint): INode;
  73. /**
  74. * @since 28.0.0
  75. */
  76. public function getMount(string $mountPoint): IMountPoint;
  77. }