LocalHomeMountProvider.php 824 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OC\Files\Mount;
  8. use OCP\Files\Config\IHomeMountProvider;
  9. use OCP\Files\Storage\IStorageFactory;
  10. use OCP\IUser;
  11. /**
  12. * Mount provider for regular posix home folders
  13. */
  14. class LocalHomeMountProvider implements IHomeMountProvider {
  15. /**
  16. * Get the cache mount for a user
  17. *
  18. * @param IUser $user
  19. * @param IStorageFactory $loader
  20. * @return \OCP\Files\Mount\IMountPoint|null
  21. */
  22. public function getHomeMountForUser(IUser $user, IStorageFactory $loader) {
  23. $arguments = ['user' => $user];
  24. return new HomeMountPoint($user, '\OC\Files\Storage\Home', '/' . $user->getUID(), $arguments, $loader, null, null, self::class);
  25. }
  26. }