Class: QgsExternalStorageRegistry

Registry of external storage backends used by QgsExternalResourceWidget.

QgsExternalStorageRegistry is not usually directly created, but rather accessed through QgsApplication.projectStorageRegistry().

Added in version 3.22.

class qgis.core.QgsExternalStorageRegistry[source]

Bases: object

__init__()

Constructor - creates a registry of external storage backends

__init__(a0: QgsExternalStorageRegistry)
Parameters:

a0 (QgsExternalStorageRegistry)

externalStorageFromType(self, type: str | None) QgsExternalStorage | None[source]

Returns external storage implementation if the storage type matches one. Returns None otherwise

Parameters:

type (Optional[str])

Return type:

Optional[QgsExternalStorage]

externalStorages(self) List[QgsExternalStorage]

Returns a list of registered project storage implementations

Return type:

List[QgsExternalStorage]

registerExternalStorage(self, storage: QgsExternalStorage | None)[source]

Registers a storage backend and takes ownership of it

Parameters:

storage (Optional[QgsExternalStorage])

unregisterExternalStorage(self, storage: QgsExternalStorage | None)[source]

Unregisters a storage backend and destroys its instance

Parameters:

storage (Optional[QgsExternalStorage])