-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathGroupMountPoint.php
More file actions
43 lines (37 loc) Β· 1.1 KB
/
GroupMountPoint.php
File metadata and controls
43 lines (37 loc) Β· 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\GroupFolders\Mount;
use OC\Files\Mount\MountPoint;
use OC\Files\Storage\Storage;
use OCP\Files\Mount\IShareOwnerlessMount;
use OCP\Files\Mount\ISystemMountPoint;
use OCP\Files\Storage\IStorage;
use OCP\Files\Storage\IStorageFactory;
class GroupMountPoint extends MountPoint implements ISystemMountPoint, IShareOwnerlessMount {
public function __construct(
private int $folderId,
IStorage $storage,
string $mountpoint,
?array $arguments = null,
?IStorageFactory $loader = null,
?array $mountOptions = null,
?int $mountId = null,
?int $rootId = null,
) {
/** @var Storage $storage */
parent::__construct($storage, $mountpoint, $arguments, $loader, $mountOptions, $mountId, MountProvider::class);
$this->rootId = $rootId;
}
public function getMountType(): string {
return 'group';
}
public function getFolderId(): int {
return $this->folderId;
}
public function getSourcePath(): string {
return '/__groupfolders/' . $this->getFolderId();
}
}