\OCP\Files\External\ServiceIStoragesService

Service interface to manage external storages

Summary

Methods
Constants
getStorage()
getAllStorages()
getStorages()
getVisibilityType()
createConfig()
addStorage()
createStorage()
updateStorage()
removeStorage()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getStorage()

getStorage(integer  $id) : \OCP\Files\External\IStorageConfig

Get a storage with status

Parameters

integer $id

storage mount numeric id

Throws

\OCP\Files\External\NotFoundException

if the storage with the given id was not found

Returns

\OCP\Files\External\IStorageConfig

getAllStorages()

getAllStorages() : array<mixed,\OCP\Files\External\IStorageConfig>

Gets all storages, valid or not

Returns

array<mixed,\OCP\Files\External\IStorageConfig> —

array of storage configs

getVisibilityType()

getVisibilityType() : string

Get the visibility type for this service, used in validation

Returns

string —

IStoragesBackendService::VISIBILITY_* constants

createStorage()

createStorage(string  $mountPoint, string  $backendIdentifier, string  $authMechanismIdentifier, array  $backendOptions, array|null  $mountOptions = null, array|null  $applicableUsers = null, array|null  $applicableGroups = null, integer|null  $priority = null) : \OCP\Files\External\IStorageConfig

Create a storage from its parameters

Parameters

string $mountPoint

storage mount point

string $backendIdentifier

backend identifier

string $authMechanismIdentifier

authentication mechanism identifier

array $backendOptions

backend-specific options

array|null $mountOptions

mount-specific options

array|null $applicableUsers

users for which to mount the storage

array|null $applicableGroups

groups for which to mount the storage

integer|null $priority

priority

Returns

\OCP\Files\External\IStorageConfig

updateStorage()

updateStorage(\OCP\Files\External\IStorageConfig  $updatedStorage) : \OCP\Files\External\IStorageConfig

Update storage to the configuration

Parameters

\OCP\Files\External\IStorageConfig $updatedStorage

storage attributes

Throws

\OCP\Files\External\NotFoundException

if the given storage does not exist in the config

Returns

\OCP\Files\External\IStorageConfig

storage config

removeStorage()

removeStorage(integer  $id) 

Delete the storage with the given id.

Parameters

integer $id

storage id

Throws

\OCP\Files\External\NotFoundException

if no storage was found with the given id