![]() |
![]() |
![]() |
UDisks Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Properties |
Eject (IN a{sv} options);
Vendor readable ay Model readable ay Revision readable ay Serial readable ay WWN readable s Media readable s MediaCompatibility readable as MediaRemovable readable b MediaAvailable readable b MediaChangeDetected readable b Size readable t TimeDetected readable t TimeMediaDetected readable t Optical readable b OpticalBlank readable b OpticalNumTracks readable u OpticalNumAudioTracks readable u OpticalNumDataTracks readable u OpticalNumSessions readable u RotationRate readable i ConnectionBus readable s Removable readable b Ejectable readable b SortKey readable s
This interface is used to represent disk drives with or without removable media.
This interface should not to be confused with the
org.freedesktop.UDisks2.Block interface that is used for
low-level block devices the OS knows about. For example, if
/dev/sda
and /dev/sdb
are block devices for two paths to the same drive, there will be
only one org.freedesktop.UDisks2.Drive object but two
org.freedesktop.UDisks2.Block objects.
Eject (IN a{sv} options);
Ejects media from the drive. This is only meaningful to do on drives with removable media.
There are not a lot of guarantees associated with this method so it should only be called in response to an user action.
On some hardware the media may be physically ejected while on other hardware may simply eject the disc. On some hardware it may not do anything physical but it may cause e.g. a display on the hardware to show e.g. “It is now safe to remove the device”.
|
Options (currently unused except for standard options). |
Media readable s
The kind of media currently in the drive or blank if unknown.
See the "MediaCompatibility" property for known values.
MediaCompatibility readable as
The physical kind of media the drive uses or the type of the drive or blank if unknown. Known values include
thumb |
The device is a thumb-drive with non-removable media (e.g. a USB stick) |
flash |
Flash Card |
flash_cf |
CompactFlash |
flash_ms |
MemoryStick |
flash_sm |
SmartMedia |
flash_sd |
Secure Digital |
flash_sdhc |
Secure Digital High Capacity |
flash_sdxc |
Secure Digital eXtended Capacity |
flash_mmc |
MultiMediaCard |
floppy |
Floppy Disk |
floppy_zip |
Zip Disk |
floppy_jaz |
Jaz Disk |
optical |
Optical Disc |
optical_cd |
Compact Disc |
optical_cd_r |
Compact Disc Recordable |
optical_cd_rw |
Compact Disc Rewritable |
optical_dvd |
Digital Versatile Disc |
optical_dvd_r |
DVD-R |
optical_dvd_rw |
DVD-RW |
optical_dvd_ram |
DVD-RAM |
optical_dvd_plus_r |
DVD+R |
optical_dvd_plus_rw |
DVD+RW |
optical_dvd_plus_r_dl |
DVD+R Dual Layer |
optical_dvd_plus_rw_dl |
DVD+RW Dual Layer |
optical_bd |
Blu-ray Disc |
optical_bd_r |
Blu-ray Recordable |
optical_bd_re |
Blu-ray Rewritable |
optical_hddvd |
HD-DVD |
optical_hddvd_r |
HD-DVD Recordable |
optical_hddvd_rw |
HD-DVD Rewritable |
optical_mo |
Magneto Optical |
optical_mrw |
Can read Mount Rainer media |
optical_mrw_w |
Can write Mount Rainer media |
MediaRemovable readable b
Whether the media can be removed from the drive.
Note that this may be overridden from what the hardware reports - for example, USB thumb drives often report that they are using removable media while in fact the media is not removable.
MediaAvailable readable b
Set to FALSE
if no medium is available.
This is always TRUE
if "MediaChangeDetected" is FALSE
.
MediaChangeDetected readable b
Set to TRUE
only if media changes are detected.
Media changes are detected on all modern disk drives through either polling or an asynchronous notification mechanism. The only known disk drives that cannot report media changes are PC floppy drives.
Size readable t
The size of the drive (or the media currently in the drive).
This is always 0 if "MediaChangeDetected" is FALSE
.
TimeDetected readable t
The time the drive was first detected.
This is expressed in micro-seconds since the Epoch Jan 1, 1970 0:00 UTC.
TimeMediaDetected readable t
The earliest time media was last detected or 0 if media is not available.
This is expressed in micro-seconds since the Epoch Jan 1, 1970 0:00 UTC.
OpticalBlank readable b
TRUE
if the disc is blank.
This is only valid if the property "Optical" is TRUE
.
OpticalNumTracks readable u
The number of tracks.
This is only valid if the property "Optical" is TRUE
.
OpticalNumAudioTracks readable u
The number of audio tracks.
This is only valid if the property "Optical" is TRUE
.
OpticalNumDataTracks readable u
The number of data tracks.
This is only valid if the property "Optical" is TRUE
.
OpticalNumSessions readable u
The number of sessions.
This is only valid if the property "Optical" is TRUE
.
RotationRate readable i
The rotational rate of the drive.
-1 if known to be rotating media but rotation rate isn't known
0 if known to be non-rotating media
the rotation rate in rounds per minute otherwise
ConnectionBus readable s
The physical connection bus used for the drive as seen by the user. This is typically used to draw a USB or Firewire emblem on top of an icon in an user interface.
Note that this property has nothing to do with the low-level command-set used (such as ATA-8) or what low-level connection bus (such as SATA, eSATA, PATA, SAS2 etc) is used.
Known values include:
Removable readable b
A hint whether the drive and/or its media is considered removable by the user.
This includes drives with removable media (cf. the "MediaRemovable" property), Flash media such as SD cards and drives on hotpluggable buses such as USB or Firewire (cf. the "ConnectionBus" property).
Note that this is only a guess.
Ejectable readable b
Whether the media can be ejected from the drive or the drive accepts an eject command to switch its state so it displays e.g. a "Safe To Remove" message to the user.
Note that this is only a guess.