aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Config
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Config')
-rw-r--r--lib/private/Files/Config/CachedMountInfo.php26
-rw-r--r--lib/private/Files/Config/MountProviderCollection.php29
-rw-r--r--lib/private/Files/Config/UserMountCache.php29
3 files changed, 0 insertions, 84 deletions
diff --git a/lib/private/Files/Config/CachedMountInfo.php b/lib/private/Files/Config/CachedMountInfo.php
index 80423dcae40..dc1504c943c 100644
--- a/lib/private/Files/Config/CachedMountInfo.php
+++ b/lib/private/Files/Config/CachedMountInfo.php
@@ -54,30 +54,18 @@ class CachedMountInfo implements ICachedMountInfo {
$this->key = $rootId . '::' . $mountPoint;
}
- /**
- * @return IUser
- */
public function getUser(): IUser {
return $this->user;
}
- /**
- * @return int the numeric storage id of the mount
- */
public function getStorageId(): int {
return $this->storageId;
}
- /**
- * @return int the fileid of the root of the mount
- */
public function getRootId(): int {
return $this->rootId;
}
- /**
- * @return Node|null the root node of the mount
- */
public function getMountPointNode(): ?Node {
// TODO injection etc
Filesystem::initMountPoints($this->getUser()->getUID());
@@ -85,28 +73,14 @@ class CachedMountInfo implements ICachedMountInfo {
return $userNode->getParent()->getFirstNodeById($this->getRootId());
}
- /**
- * @return string the mount point of the mount for the user
- */
public function getMountPoint(): string {
return $this->mountPoint;
}
- /**
- * Get the id of the configured mount
- *
- * @return int|null mount id or null if not applicable
- * @since 9.1.0
- */
public function getMountId(): ?int {
return $this->mountId;
}
- /**
- * Get the internal path (within the storage) of the root of the mount
- *
- * @return string
- */
public function getRootInternalPath(): string {
return $this->rootInternalPath;
}
diff --git a/lib/private/Files/Config/MountProviderCollection.php b/lib/private/Files/Config/MountProviderCollection.php
index 1dbc469c8c3..36e19854e46 100644
--- a/lib/private/Files/Config/MountProviderCollection.php
+++ b/lib/private/Files/Config/MountProviderCollection.php
@@ -138,13 +138,6 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
return array_merge($lateMounts, $firstMounts);
}
- /**
- * Get the configured home mount for this user
- *
- * @param \OCP\IUser $user
- * @return \OCP\Files\Mount\IMountPoint
- * @since 9.1.0
- */
public function getHomeMountForUser(IUser $user) {
/** @var \OCP\Files\Config\IHomeMountProvider[] $providers */
$providers = array_reverse($this->homeProviders); // call the latest registered provider first to give apps an opportunity to overwrite builtin
@@ -157,11 +150,6 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
throw new \Exception('No home storage configured for user ' . $user);
}
- /**
- * Add a provider for mount points
- *
- * @param \OCP\Files\Config\IMountProvider $provider
- */
public function registerProvider(IMountProvider $provider) {
$this->providers[] = $provider;
@@ -183,22 +171,11 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
});
}
- /**
- * Add a provider for home mount points
- *
- * @param \OCP\Files\Config\IHomeMountProvider $provider
- * @since 9.1.0
- */
public function registerHomeProvider(IHomeMountProvider $provider) {
$this->homeProviders[] = $provider;
$this->emit('\OC\Files\Config', 'registerHomeMountProvider', [$provider]);
}
- /**
- * Get the mount cache which can be used to search for mounts without setting up the filesystem
- *
- * @return IUserMountCache
- */
public function getMountCache() {
return $this->mountCache;
}
@@ -207,12 +184,6 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
$this->rootProviders[] = $provider;
}
- /**
- * Get all root mountpoints
- *
- * @return \OCP\Files\Mount\IMountPoint[]
- * @since 20.0.0
- */
public function getRootMounts(): array {
$loader = $this->loader;
$mounts = array_map(function (IRootMountProvider $provider) use ($loader) {
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index 94da770b63f..e3a41131af0 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -11,7 +11,6 @@ use OC\User\LazyUser;
use OCP\Cache\CappedMemoryCache;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Diagnostics\IEventLogger;
-use OCP\Files\Config\ICachedMountFileInfo;
use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\NotFoundException;
@@ -224,10 +223,6 @@ class UserMountCache implements IUserMountCache {
}
}
- /**
- * @param IUser $user
- * @return ICachedMountInfo[]
- */
public function getMountsForUser(IUser $user) {
$userUID = $user->getUID();
if (!$this->userManager->userExists($userUID)) {
@@ -268,11 +263,6 @@ class UserMountCache implements IUserMountCache {
return $query->executeQuery()->fetchOne() ?: '';
}
- /**
- * @param int $numericStorageId
- * @param string|null $user limit the results to a single user
- * @return CachedMountInfo[]
- */
public function getMountsForStorageId($numericStorageId, $user = null) {
$builder = $this->connection->getQueryBuilder();
$query = $builder->select('storage_id', 'root_id', 'user_id', 'mount_point', 'mount_id', 'f.path', 'mount_provider_class')
@@ -291,10 +281,6 @@ class UserMountCache implements IUserMountCache {
return array_filter(array_map([$this, 'dbRowToMountInfo'], $rows));
}
- /**
- * @param int $rootFileId
- * @return CachedMountInfo[]
- */
public function getMountsForRootId($rootFileId) {
$builder = $this->connection->getQueryBuilder();
$query = $builder->select('storage_id', 'root_id', 'user_id', 'mount_point', 'mount_id', 'f.path', 'mount_provider_class')
@@ -338,12 +324,6 @@ class UserMountCache implements IUserMountCache {
return $this->cacheInfoCache[$fileId];
}
- /**
- * @param int $fileId
- * @param string|null $user optionally restrict the results to a single user
- * @return ICachedMountFileInfo[]
- * @since 9.0.0
- */
public function getMountsForFileId($fileId, $user = null) {
try {
[$storageId, $internalPath] = $this->getCacheInfoFromFileId($fileId);
@@ -380,11 +360,6 @@ class UserMountCache implements IUserMountCache {
}, $filteredMounts);
}
- /**
- * Remove all cached mounts for a user
- *
- * @param IUser $user
- */
public function removeUserMounts(IUser $user) {
$builder = $this->connection->getQueryBuilder();
@@ -410,10 +385,6 @@ class UserMountCache implements IUserMountCache {
$query->execute();
}
- /**
- * @param array $users
- * @return array
- */
public function getUsedSpaceForUsers(array $users) {
$builder = $this->connection->getQueryBuilder();