imountpoint.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * @author Morris Jobke <hey@morrisjobke.de>
  4. * @author Robin Appelman <icewind@owncloud.com>
  5. *
  6. * @copyright Copyright (c) 2015, 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. * A storage mounted to folder on the filesystem
  25. * @since 8.0.0
  26. */
  27. interface IMountPoint {
  28. /**
  29. * get complete path to the mount point
  30. *
  31. * @return string
  32. * @since 8.0.0
  33. */
  34. public function getMountPoint();
  35. /**
  36. * Set the mountpoint
  37. *
  38. * @param string $mountPoint new mount point
  39. * @since 8.0.0
  40. */
  41. public function setMountPoint($mountPoint);
  42. /**
  43. * Get the storage that is mounted
  44. *
  45. * @return \OC\Files\Storage\Storage
  46. * @since 8.0.0
  47. */
  48. public function getStorage();
  49. /**
  50. * Get the id of the storages
  51. *
  52. * @return string
  53. * @since 8.0.0
  54. */
  55. public function getStorageId();
  56. /**
  57. * Get the path relative to the mountpoint
  58. *
  59. * @param string $path absolute path to a file or folder
  60. * @return string
  61. * @since 8.0.0
  62. */
  63. public function getInternalPath($path);
  64. /**
  65. * Apply a storage wrapper to the mounted storage
  66. *
  67. * @param callable $wrapper
  68. * @since 8.0.0
  69. */
  70. public function wrapStorage($wrapper);
  71. /**
  72. * Get a mount option
  73. *
  74. * @param string $name Name of the mount option to get
  75. * @param mixed $default Default value for the mount option
  76. * @return mixed
  77. * @since 8.0.0
  78. */
  79. public function getOption($name, $default);
  80. /**
  81. * Get all options for the mount
  82. *
  83. * @return array
  84. * @since 8.1.0
  85. */
  86. public function getOptions();
  87. }