imountmanager.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. /**
  3. * @author Morris Jobke <hey@morrisjobke.de>
  4. * @author Robin Appelman <icewind@owncloud.com>
  5. *
  6. * @copyright Copyright (c) 2016, ownCloud, Inc.
  7. * @license AGPL-3.0
  8. *
  9. * This code is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License, version 3,
  11. * as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public License, version 3,
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>
  20. *
  21. */
  22. namespace OCP\Files\Mount;
  23. /**
  24. * Interface IMountManager
  25. *
  26. * Manages all mounted storages in the system
  27. * @since 8.2.0
  28. */
  29. interface IMountManager {
  30. /**
  31. * Add a new mount
  32. *
  33. * @param \OCP\Files\Mount\IMountPoint $mount
  34. * @since 8.2.0
  35. */
  36. public function addMount(IMountPoint $mount);
  37. /**
  38. * Remove a mount
  39. *
  40. * @param string $mountPoint
  41. * @since 8.2.0
  42. */
  43. public function removeMount($mountPoint);
  44. /**
  45. * Change the location of a mount
  46. *
  47. * @param string $mountPoint
  48. * @param string $target
  49. * @since 8.2.0
  50. */
  51. public function moveMount($mountPoint, $target);
  52. /**
  53. * Find the mount for $path
  54. *
  55. * @param string $path
  56. * @return \OCP\Files\Mount\IMountPoint
  57. * @since 8.2.0
  58. */
  59. public function find($path);
  60. /**
  61. * Find all mounts in $path
  62. *
  63. * @param string $path
  64. * @return \OCP\Files\Mount\IMountPoint[]
  65. * @since 8.2.0
  66. */
  67. public function findIn($path);
  68. /**
  69. * Remove all registered mounts
  70. *
  71. * @since 8.2.0
  72. */
  73. public function clear();
  74. /**
  75. * Find mounts by storage id
  76. *
  77. * @param string $id
  78. * @return \OCP\Files\Mount\IMountPoint[]
  79. * @since 8.2.0
  80. */
  81. public function findByStorageId($id);
  82. /**
  83. * @return \OCP\Files\Mount\IMountPoint[]
  84. * @since 8.2.0
  85. */
  86. public function getAll();
  87. /**
  88. * Find mounts by numeric storage id
  89. *
  90. * @param int $id
  91. * @return \OCP\Files\Mount\IMountPoint[]
  92. * @since 8.2.0
  93. */
  94. public function findByNumericId($id);
  95. }