2016-05-17 15:40:55 -04:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2016-05-17 15:40:55 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2016-05-17 15:40:55 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Files\Mount;
|
|
|
|
|
|
|
|
|
|
use OCP\Files\Config\IHomeMountProvider;
|
|
|
|
|
use OCP\Files\Storage\IStorageFactory;
|
|
|
|
|
use OCP\IUser;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Mount provider for regular posix home folders
|
|
|
|
|
*/
|
|
|
|
|
class LocalHomeMountProvider implements IHomeMountProvider {
|
|
|
|
|
/**
|
|
|
|
|
* Get the cache mount for a user
|
|
|
|
|
*
|
|
|
|
|
* @param IUser $user
|
|
|
|
|
* @param IStorageFactory $loader
|
2020-07-08 07:58:27 -04:00
|
|
|
* @return \OCP\Files\Mount\IMountPoint|null
|
2016-05-17 15:40:55 -04:00
|
|
|
*/
|
|
|
|
|
public function getHomeMountForUser(IUser $user, IStorageFactory $loader) {
|
|
|
|
|
$arguments = ['user' => $user];
|
2023-10-25 12:04:34 -04:00
|
|
|
return new HomeMountPoint($user, '\OC\Files\Storage\Home', '/' . $user->getUID(), $arguments, $loader, null, null, self::class);
|
2016-05-17 15:40:55 -04:00
|
|
|
}
|
|
|
|
|
}
|