mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
Merge pull request #57893 from nextcloud/carl/cachemountinfo-refactor
This commit is contained in:
commit
400fe317e9
1 changed files with 10 additions and 34 deletions
|
|
@ -13,45 +13,21 @@ use OCP\Files\Node;
|
|||
use OCP\IUser;
|
||||
|
||||
class CachedMountInfo implements ICachedMountInfo {
|
||||
protected IUser $user;
|
||||
protected int $storageId;
|
||||
protected int $rootId;
|
||||
protected string $mountPoint;
|
||||
protected ?int $mountId;
|
||||
protected string $rootInternalPath;
|
||||
protected string $mountProvider;
|
||||
protected string $key;
|
||||
|
||||
/**
|
||||
* CachedMountInfo constructor.
|
||||
*
|
||||
* @param IUser $user
|
||||
* @param int $storageId
|
||||
* @param int $rootId
|
||||
* @param string $mountPoint
|
||||
* @param int|null $mountId
|
||||
* @param string $rootInternalPath
|
||||
*/
|
||||
public function __construct(
|
||||
IUser $user,
|
||||
int $storageId,
|
||||
int $rootId,
|
||||
string $mountPoint,
|
||||
string $mountProvider,
|
||||
?int $mountId = null,
|
||||
string $rootInternalPath = '',
|
||||
protected IUser $user,
|
||||
protected int $storageId,
|
||||
protected int $rootId,
|
||||
protected string $mountPoint,
|
||||
protected string $mountProvider,
|
||||
protected ?int $mountId = null,
|
||||
protected string $rootInternalPath = '',
|
||||
) {
|
||||
$this->user = $user;
|
||||
$this->storageId = $storageId;
|
||||
$this->rootId = $rootId;
|
||||
$this->mountPoint = $mountPoint;
|
||||
$this->mountId = $mountId;
|
||||
$this->rootInternalPath = $rootInternalPath;
|
||||
if (strlen($mountProvider) > 128) {
|
||||
throw new \Exception("Mount provider $mountProvider name exceeds the limit of 128 characters");
|
||||
if (strlen($this->mountProvider) > 128) {
|
||||
throw new \Exception("Mount provider $this->mountProvider name exceeds the limit of 128 characters");
|
||||
}
|
||||
$this->mountProvider = $mountProvider;
|
||||
$this->key = $rootId . '::' . $mountPoint;
|
||||
$this->key = $this->rootId . '::' . $this->mountPoint;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue