get_activation_root
Description:
Gets the activation root for a Volume if it is known ahead of mount time.
Returns null otherwise. If not null and if this is mounted, then the result of get_root on the Mount object obtained from get_mount will always either be equal or a prefix of what this function returns. In other words, in code
GMount *mount;
GFile *mount_root
GFile *volume_activation_root;
mount = g_volume_get_mount (volume); // mounted, so never NULL
mount_root = g_mount_get_root (mount);
volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL
then the expression (g_file_has_prefix (volume_activation_root, mount_root) ||
g_file_equal (volume_activation_root, mount_root))
will always be true.
Activation roots are typically used in VolumeMonitor implementations to find the underlying mount to shadow, see is_shadowed for more details.
Parameters:
this |
a Volume |
Returns:
the activation root of this or null. Use unref to free. |