IUserMountCache
Cache mounts points per user in the cache so we can easily look them up
Tags
Table of Contents
- clear() : void
- Clear all entries from the in-memory cache
- getMountsForFileId() : \OCP\Files\Config\ICachedMountFileInfo[]
- Get all cached mounts that contain a file
- getMountsForRootId() : \OCP\Files\Config\ICachedMountInfo[]
- Get all cached mounts by root
- getMountsForStorageId() : \OCP\Files\Config\ICachedMountInfo[]
- Get all cached mounts by storage
- getMountsForUser() : \OCP\Files\Config\ICachedMountInfo[]
- Get all cached mounts for a user
- getUsedSpaceForUsers() : int[]
- Get the used space for users
- registerMounts() : mixed
- Register mounts for a user to the cache
- remoteStorageMounts() : mixed
- Remove all cached mounts for a storage
- removeUserMounts() : mixed
- Remove all cached mounts for a user
- removeUserStorageMount() : mixed
- Remove all mounts for a user and storage
Methods
clear()
Clear all entries from the in-memory cache
public
clear() : void
Tags
getMountsForFileId()
Get all cached mounts that contain a file
public
getMountsForFileId(int $fileId[, string|null $user = null ]) : \OCP\Files\Config\ICachedMountFileInfo[]
Parameters
- $fileId : int
- $user : string|null = null
-
optionally restrict the results to a single user @since 12.0.0
Tags
Return values
\OCP\Files\Config\ICachedMountFileInfo[] —getMountsForRootId()
Get all cached mounts by root
public
getMountsForRootId(int $rootFileId) : \OCP\Files\Config\ICachedMountInfo[]
Parameters
- $rootFileId : int
Tags
Return values
\OCP\Files\Config\ICachedMountInfo[] —getMountsForStorageId()
Get all cached mounts by storage
public
getMountsForStorageId(int $numericStorageId[, string|null $user = null ]) : \OCP\Files\Config\ICachedMountInfo[]
Parameters
- $numericStorageId : int
- $user : string|null = null
-
limit the results to a single user @since 12.0.0
Tags
Return values
\OCP\Files\Config\ICachedMountInfo[] —getMountsForUser()
Get all cached mounts for a user
public
getMountsForUser(IUser $user) : \OCP\Files\Config\ICachedMountInfo[]
Parameters
- $user : IUser
Tags
Return values
\OCP\Files\Config\ICachedMountInfo[] —getUsedSpaceForUsers()
Get the used space for users
public
getUsedSpaceForUsers(\OCP\IUser[] $users) : int[]
Note that this only includes the space in their home directory, not any incoming shares or external storages.
Parameters
- $users : \OCP\IUser[]
Tags
Return values
int[] —[$userId => $userSpace]
registerMounts()
Register mounts for a user to the cache
public
registerMounts(IUser $user, \OCP\Files\Mount\IMountPoint[] $mounts) : mixed
Parameters
- $user : IUser
- $mounts : \OCP\Files\Mount\IMountPoint[]
Tags
Return values
mixed —remoteStorageMounts()
Remove all cached mounts for a storage
public
remoteStorageMounts( $storageId) : mixed
Parameters
Tags
Return values
mixed —removeUserMounts()
Remove all cached mounts for a user
public
removeUserMounts(IUser $user) : mixed
Parameters
- $user : IUser
Tags
Return values
mixed —removeUserStorageMount()
Remove all mounts for a user and storage
public
removeUserStorageMount( $storageId, string $userId) : mixed