gio-qt 0.0.16
Loading...
Searching...
No Matches
DGioMount Class Reference
Inheritance diagram for DGioMount:
Collaboration diagram for DGioMount:

Public Member Functions

 DGioMount (Gio::Mount *gmmMountPtr, QObject *parent=nullptr)
QString name () const
QString uuid () const
QString mountClass () const
bool isShadowed () const
 Determines if mount is shadowed.
bool canUnmount () const
bool canEject () const
QString sortKey () const
QStringList themedIconNames () const
QStringList themedSymbolicIconNames () const
void unmount (bool forceUnmount=false)
void eject (bool forceEject=false)
QExplicitlySharedDataPointer< DGioFilegetRootFile ()
QExplicitlySharedDataPointer< DGioFilegetDefaultLocationFile ()
QExplicitlySharedDataPointer< DGioVolumegetVolume ()

Static Public Member Functions

static DGioMountcreateFromPath (QString path, QObject *parent=nullptr)
 Create a DGioMount instance by a given path.

Member Function Documentation

◆ createFromPath()

DGioMount * DGioMount::createFromPath ( QString path,
QObject * parent = nullptr )
static

Create a DGioMount instance by a given path.

Returns
the created DGioMount instance or nullptr if failed.

◆ isShadowed()

bool DGioMount::isShadowed ( ) const

Determines if mount is shadowed.

A mount is said to be shadowed if there exists one or more user visible objects (currently Mount objects) with a root that is inside the root of mount.

One application of shadow mounts is when exposing a single file system that is used to address several logical volumes. In this situation, a Gio::VolumeMonitor implementation would create two Gio::Volume objects, in gio-qt, DGioVolumeManager will create two DGioVolume objects.

For example, one for the camera functionality of the device and one for a SD card reader on the device) with activation URIs gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/. When the underlying mount (with root gphoto2://[usb:001,002]/) is mounted, said VolumeMonitor implementation would create two Mount objects (each with their root matching the corresponding volume activation root) that would shadow the original mount.

Returns
true if mount is shadowed

The documentation for this class was generated from the following files: