Nextcloud PHP API (master)

IUserMountCache

Cache mounts points per user in the cache so we can easily look them up

Tags
since
9.0.0

Table of Contents

Methods

clear()  : void
Clear all entries from the in-memory cache
getMountForPath()  : ICachedMountInfo
Get all cached mounts for a user
getMountsForFileId()  : array<string|int, ICachedMountFileInfo>
Get all cached mounts that contain a file
getMountsForRootId()  : array<string|int, ICachedMountInfo>
Get all cached mounts by root
getMountsForStorageId()  : array<string|int, ICachedMountInfo>
Get all cached mounts by storage
getMountsForUser()  : array<string|int, ICachedMountInfo>
Get all cached mounts for a user
getMountsInPath()  : array<string|int, ICachedMountInfo>
Get all cached mounts for a user inside a path
getUsedSpaceForUsers()  : array<string|int, 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
since
20.0.0

getMountsForFileId()

Get all cached mounts that contain a file

public getMountsForFileId(int $fileId[, string|null $user = null ]) : array<string|int, ICachedMountFileInfo>
Parameters
$fileId : int
$user : string|null = null

optionally restrict the results to a single user @since 12.0.0

Tags
since
9.0.0
Return values
array<string|int, ICachedMountFileInfo>

getMountsForRootId()

Get all cached mounts by root

public getMountsForRootId(int $rootFileId) : array<string|int, ICachedMountInfo>
Parameters
$rootFileId : int
Tags
since
9.0.0
Return values
array<string|int, ICachedMountInfo>

getMountsForStorageId()

Get all cached mounts by storage

public getMountsForStorageId(int $numericStorageId[, string|null $user = null ]) : array<string|int, ICachedMountInfo>
Parameters
$numericStorageId : int
$user : string|null = null

limit the results to a single user @since 12.0.0

Tags
since
9.0.0
Return values
array<string|int, ICachedMountInfo>

getUsedSpaceForUsers()

Get the used space for users

public getUsedSpaceForUsers(array<string|int, IUser$users) : array<string|int, int>

Note that this only includes the space in their home directory, not any incoming shares or external storage.

Parameters
$users : array<string|int, IUser>
Tags
since
13.0.0
Return values
array<string|int, int>

[$userId => $userSpace]

registerMounts()

Register mounts for a user to the cache

public registerMounts(IUser $user, array<string|int, IMountPoint$mounts[, array<string|int, mixed>|null $mountProviderClasses = null ]) : mixed
Parameters
$user : IUser
$mounts : array<string|int, IMountPoint>
$mountProviderClasses : array<string|int, mixed>|null = null
Tags
since
9.0.0

remoteStorageMounts()

Remove all cached mounts for a storage

public remoteStorageMounts(mixed $storageId) : mixed
Parameters
$storageId : mixed
Tags
since
9.0.0

removeUserMounts()

Remove all cached mounts for a user

public removeUserMounts(IUser $user) : mixed
Parameters
$user : IUser
Tags
since
9.0.0

removeUserStorageMount()

Remove all mounts for a user and storage

public removeUserStorageMount(mixed $storageId, string $userId) : mixed
Parameters
$storageId : mixed
$userId : string
Tags
since
9.0.0

        
On this page

Search results