IPartialMountProvider
extends
IMountProvider
in
This interface marks mount providers that can provide IMountPoints related to a path based on the provided mount and root metadata.
Tags
Table of Contents
Methods
- getMountsForPath() : array<string, IMountPoint>
- Get the mounts for a user by path.
- getMountsForUser() : array<int, IMountPoint>
- Get all mountpoints applicable for the user
Methods
getMountsForPath()
Get the mounts for a user by path.
public
getMountsForPath(string $setupPathHint, bool $forChildren, array<int, MountProviderArgs> $mountProviderArgs, IStorageFactory $loader) : array<string, IMountPoint>
Called during the Filesystem setup of a specific path.
The provided arguments give information about the path being set up, as well as information about mount points known to be provided by the mount provider and contained in the path or in its sub-paths.
Implementations should verify the MountProviderArgs and return the corresponding IMountPoint instances.
If the mount for one of the MountProviderArgs no longer exists, implementations should simply leave them out from the returned mounts.
Implementations are allowed to, but not expected to, return more mounts than requested.
The user for which the mounts are being setup can be found in the mountInfo->getUser()
of a MountProviderArgs.
All provided MountProviderArgs will always be for the same user.
Parameters
- $setupPathHint : string
-
path for which the mounts are being set up. This might not be the same as the path of the expected mount(s).
- $forChildren : bool
-
when true, only child mounts for
$setupPathHintwere requested. The $mountProviderArgs will hold a list of expected child mounts - $mountProviderArgs : array<int, MountProviderArgs>
-
The data for the mount which should be provided. Contains the mount information and root-cache-entry for each mount the system knows about in the scope of the setup request.
- $loader : IStorageFactory
Return values
array<string, IMountPoint> —IMountPoint instances, indexed by mount-point
getMountsForUser()
Get all mountpoints applicable for the user
public
getMountsForUser(IUser $user, IStorageFactory $loader) : array<int, IMountPoint>
Parameters
- $user : IUser
- $loader : IStorageFactory