2016-05-17 15:40:55 -04:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2026-02-09 04:53:58 -05:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
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;
|
2025-11-17 09:32:54 -05:00
|
|
|
use OCP\Files\Mount\IMountPoint;
|
2016-05-17 15:40:55 -04:00
|
|
|
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
|
2025-11-17 09:32:54 -05:00
|
|
|
* @return 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
|
|
|
}
|
|
|
|
|
}
|