module Gio::Drive
Overview
#GDrive - this represent a piece of hardware connected to the machine. It's generally only created for removable hardware or hardware with removable media.
#GDrive is a container class for #GVolume objects that stem from the same piece of media. As such, #GDrive abstracts a drive with (or without) removable media and provides operations for querying whether media is available, determining whether media change is automatically detected and ejecting the media.
If the #GDrive reports that media isn't automatically detected, one can poll for media; typically one should not do this periodically as a poll for media operation is potentially expensive and may spin up the drive creating noise.
#GDrive supports starting and stopping drives with authentication support for the former. This can be used to support a diverse set of use cases including connecting/disconnecting iSCSI devices, powering down external disk enclosures and starting/stopping multi-disk devices such as RAID devices. Note that the actual semantics and side-effects of starting/stopping a #GDrive may vary according to implementation. To choose the correct verbs in e.g. a file manager, use g_drive_get_start_stop_type().
For porting from GnomeVFS note that there is no equivalent of #GDrive in that API.
Defined in:
lib/gi-crystal/src/auto/gio-2.0/drive.crClass Method Summary
Instance Method Summary
- #can_eject : Bool
- #can_poll_for_media : Bool
- #can_start : Bool
- #can_start_degraded : Bool
- #can_stop : Bool
- #changed_signal
- #disconnected_signal
- #eject(flags : Gio::MountUnmountFlags, cancellable : Gio::Cancellable?, callback : Gio::AsyncReadyCallback?, user_data : Pointer(Void)?) : Nil
- #eject_button_signal
- #eject_finish(result : Gio::AsyncResult) : Bool
- #eject_with_operation(flags : Gio::MountUnmountFlags, mount_operation : Gio::MountOperation?, cancellable : Gio::Cancellable?, callback : Gio::AsyncReadyCallback?, user_data : Pointer(Void)?) : Nil
- #eject_with_operation_finish(result : Gio::AsyncResult) : Bool
- #enumerate_identifiers : Enumerable(String)
- #has_media : Bool
- #has_volumes : Bool
- #icon : Gio::Icon
- #identifier(kind : String) : String?
- #is_media_check_automatic : Bool
- #is_media_removable : Bool
- #is_removable : Bool
- #name : String
- #poll_for_media(cancellable : Gio::Cancellable?, callback : Gio::AsyncReadyCallback?, user_data : Pointer(Void)?) : Nil
- #poll_for_media_finish(result : Gio::AsyncResult) : Bool
- #sort_key : String?
- #start(flags : Gio::DriveStartFlags, mount_operation : Gio::MountOperation?, cancellable : Gio::Cancellable?, callback : Gio::AsyncReadyCallback?, user_data : Pointer(Void)?) : Nil
- #start_finish(result : Gio::AsyncResult) : Bool
- #start_stop_type : Gio::DriveStartStopType
- #stop(flags : Gio::MountUnmountFlags, mount_operation : Gio::MountOperation?, cancellable : Gio::Cancellable?, callback : Gio::AsyncReadyCallback?, user_data : Pointer(Void)?) : Nil
- #stop_button_signal
- #stop_finish(result : Gio::AsyncResult) : Bool
- #symbolic_icon : Gio::Icon
- #to_unsafe
- #volumes : GLib::List