123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- namespace OC\Files\Config;
- use OCP\Files\Mount\IMountPoint;
- use OCP\IUser;
- class LazyStorageMountInfo extends CachedMountInfo {
- private IMountPoint $mount;
-
- public function __construct(IUser $user, IMountPoint $mount) {
- $this->user = $user;
- $this->mount = $mount;
- $this->rootId = 0;
- $this->storageId = 0;
- $this->mountPoint = '';
- }
-
- public function getStorageId(): int {
- if (!$this->storageId) {
- $this->storageId = $this->mount->getNumericStorageId();
- }
- return parent::getStorageId();
- }
-
- public function getRootId(): int {
- if (!$this->rootId) {
- $this->rootId = $this->mount->getStorageRootId();
- }
- return parent::getRootId();
- }
-
- public function getMountPoint(): string {
- if (!$this->mountPoint) {
- $this->mountPoint = $this->mount->getMountPoint();
- }
- return parent::getMountPoint();
- }
- public function getMountId(): ?int {
- return $this->mount->getMountId();
- }
-
- public function getRootInternalPath(): string {
- return $this->mount->getInternalPath($this->mount->getMountPoint());
- }
- public function getMountProvider(): string {
- return $this->mount->getMountProvider();
- }
- }
|