IUserMountCache

interface OCP\Files\Config\IUserMountCache
Cache mounts points per user in the cache so we can easily look them up
Implemented by:OC\Files\Config\UserMountCache
Source:lib/public/Files/Config/IUserMountCache.php#35

Methods

public OCP\Files\Config\IUserMountCache::registerMounts($user, $mounts)
Register mounts for a user to the cache
Source:

lib/public/Files/Config/IUserMountCache.php#43

Parameters:
Since:

9.0.0

public OCP\Files\Config\IUserMountCache::getMountsForUser($user)
Get all cached mounts for a user
Source:

lib/public/Files/Config/IUserMountCache.php#52

Parameters:
Returns:

\OCP\Files\Config\ICachedMountInfo[]

Since:

9.0.0

public OCP\Files\Config\IUserMountCache::getMountsForStorageId($numericStorageId, $user=null)
Get all cached mounts by storage
Source:

lib/public/Files/Config/IUserMountCache.php#62

Parameters:
  • $numericStorageId (int)
  • $user (string | null) limit the results to a single user @since 12.0.0
Returns:

\OCP\Files\Config\ICachedMountInfo[]

Since:

9.0.0

public OCP\Files\Config\IUserMountCache::getMountsForRootId($rootFileId)
Get all cached mounts by root
Source:

lib/public/Files/Config/IUserMountCache.php#71

Parameters:
  • $rootFileId (int)
Returns:

\OCP\Files\Config\ICachedMountInfo[]

Since:

9.0.0

public OCP\Files\Config\IUserMountCache::getMountsForFileId($fileId, $user=null)
Get all cached mounts that contain a file
Source:

lib/public/Files/Config/IUserMountCache.php#81

Parameters:
  • $fileId (int)
  • $user (string | null) optionally restrict the results to a single user @since 12.0.0
Returns:

\OCP\Files\Config\ICachedMountFileInfo[]

Since:

9.0.0

public OCP\Files\Config\IUserMountCache::removeUserMounts($user)
Remove all cached mounts for a user
Source:

lib/public/Files/Config/IUserMountCache.php#89

Parameters:
Since:

9.0.0

public OCP\Files\Config\IUserMountCache::removeUserStorageMount($storageId, $userId)
Remove all mounts for a user and storage
Source:

lib/public/Files/Config/IUserMountCache.php#99

Parameters:
  • $storageId
  • $userId (string)
Returns:

mixed

Since:

9.0.0

public OCP\Files\Config\IUserMountCache::remoteStorageMounts($storageId)
Remove all cached mounts for a storage
Source:

lib/public/Files/Config/IUserMountCache.php#108

Parameters:
  • $storageId
Returns:

mixed

Since:

9.0.0

public OCP\Files\Config\IUserMountCache::getUsedSpaceForUsers($users)
Get the used space for users
Note that this only includes the space in their home directory,
not any incoming shares or external storages.
Source:

lib/public/Files/Config/IUserMountCache.php#120

Parameters:
Returns:

int[] [$userId => $userSpace]

Since:

13.0.0

public OCP\Files\Config\IUserMountCache::clear()
Clear all entries from the in-memory cache
Source:lib/public/Files/Config/IUserMountCache.php#127
Since:20.0.0