= class Burn::Drive
This class references a physical drive in the system.

== Object Hierarchy
* Object
  * Burn::Drive

== Class Methods
--- Burn::Drive.scan
    Scans for drives.
    	# Example: prints name and location of all drives 
    	Burn::Drive.scan.each do |drive|
    		puts drive.product + " on " + drive.location
    	end
    * Returns: a list of drives (cdroms/burners), as an Array of Burn::Drive objects.

== Instance Methods
--- buffer_size
    This method returns the size of the drive's buffer (in kilobytes).
    * Returns: the size of the drive's buffer (in kilobytes).

--- can_read_cdr?
    This method returns whether the drive can read CD-R discs.
    * Returns: whether the drive can read CD-R discs.

--- can_read_cdrw?
    This method returns whether the drive can read CD-RW discs.
    * Returns: whether the drive can read CD-RW discs.

--- can_read_dvdr?
    This method returns whether the drive can read DVD-R discs.
    * Returns: whether the drive can read DVD-R discs.

--- can_read_dvdram?
    This method returns whether the drive can read DVD-RAM discs.
    * Returns: whether the drive can read DVD-RAM discs.

--- can_read_dvdrom?
    This method returns whether the drive can read DVD-ROM discs.
    * Returns: whether the drive can read DVD-ROM discs.

--- can_report_c2_errors?
    This method returns whether the drive can report C2 errors.
    * Returns: whether the drive can report C2 errors.

--- can_write_cdr?
    This method returns whether the drive can write CD-R discs.
    * Returns: whether the drive can write CD-R discs.

--- can_write_cdrw?
    This method returns whether the drive can write CD-RW discs.
    * Returns: whether the drive can write CD-RW discs.

--- can_write_dvdr?
    This method returns whether the drive can write DVD-R discs.
    * Returns: whether the drive can write DVD-R discs.

--- can_write_dvdram?
    This method returns whether the drive can write DVD-RAM discs.
    * Returns: whether the drive can write DVD-RAM discs.

--- can_write_simulate?
    This method returns whether the drive can simulate a write.
    * Returns: whether the drive can simulate a write.

--- cancel!
    Cancels an operation on a drive.
    This will only work when the drive's busy state is
    Burn::Drive::STATUS_READING or Burn::Drive::STATUS_WRITING.
    * Returns: self.

--- disc
    This method returns the drive's disc, as a newly allocated Burn::Disc object.
    * Returns: the drive's disc, as a newly allocated Burn::Disc object.

--- disc_erasable?
    Checks whether a disc can be erased or not.
    * Returns: true if erasable, false if not.

--- disc_status
    Retrieves what kind of disc a drive is holding. This method may need to be
    called more than once to get a proper status from it.
    * Returns: a disc status (either Burn::Disc::STATUS_APPENDABLE,  Burn::Disc::STATUS_BLANK, Burn::Disc::STATUS_EMPTY, Burn::Disc::STATUS_UNREADY, or Burn::Disc::STATUS_FULL).

--- erase_disc!(fast)
    Erases a disc in the drive. The drive must be grabbed successfully BEFORE
    calling this method. Always ensure that the drive reports a status of
    Burn::Disc::STATUS_FULL before calling this function. An erase operation
    is not cancellable, as control of the operation is passed wholly to the
    drive and there is no way to interrupt it safely.
    * fast: true to do a fast erase, where only the disc's headers are erased; false to erase the entire disc.  
    * Returns: self.

--- grab!(load)
    Grabs a drive. This must be done before the drive can be used (for
    reading, writing, etc). It may be neccesary to call this method more than
    once to grab a drive.
    * load: true to make the drive attempt to load a disc (close its tray door, etc).  
    * Returns: true is the drive has been grabbed, false otherwise.

--- location
    This method returns the location of the drive in the filesystem.
    * Returns: the location of the drive in the filesystem.

--- packet_block_types
    This method returns the supported block types in packet mode (either Burn::BLOCK_RAW0, Burn::BLOCK_RAW16, Burn::BLOCK_RAW96P, Burn::BLOCK_RAW96R, Burn::BLOCK_MODE1, Burn::BLOCK_MODE2_PATHETIC, Burn::BLOCK_MODE2_LAME, Burn::BLOCK_MODE2_OBSCURE, Burn::BLOCK_MODE2_OK, Burn::BLOCK_MODE2R).
    * Returns: the supported block types in packet mode (either Burn::BLOCK_RAW0, Burn::BLOCK_RAW16, Burn::BLOCK_RAW96P, Burn::BLOCK_RAW96R, Burn::BLOCK_MODE1, Burn::BLOCK_MODE2_PATHETIC, Burn::BLOCK_MODE2_LAME, Burn::BLOCK_MODE2_OBSCURE, Burn::BLOCK_MODE2_OK, Burn::BLOCK_MODE2R).

--- product
    This method returns the name of the drive.
    * Returns: the name of the drive.

--- progress
    This method returns the progres of the current operation on the drive, as a newly allocated Burn::Progress object.
    * Returns: the progres of the current operation on the drive, as a newly allocated Burn::Progress object.

--- raw_block_types
    This method returns the supported block types in raw mode (either Burn::BLOCK_RAW0, Burn::BLOCK_RAW16, Burn::BLOCK_RAW96P, Burn::BLOCK_RAW96R, Burn::BLOCK_MODE1, Burn::BLOCK_MODE2_PATHETIC, Burn::BLOCK_MODE2_LAME, Burn::BLOCK_MODE2_OBSCURE, Burn::BLOCK_MODE2_OK, Burn::BLOCK_MODE2R).
    * Returns: the supported block types in raw mode (either Burn::BLOCK_RAW0, Burn::BLOCK_RAW16, Burn::BLOCK_RAW96P, Burn::BLOCK_RAW96R, Burn::BLOCK_MODE1, Burn::BLOCK_MODE2_PATHETIC, Burn::BLOCK_MODE2_LAME, Burn::BLOCK_MODE2_OBSCURE, Burn::BLOCK_MODE2_OK, Burn::BLOCK_MODE2R).

--- read_speed
    This method returns maximum read speed for a drive in k/s.
    * Returns: maximum read speed for a drive in k/s.

--- release!(eject)
    Releases a drive. This should not be done until the drive is no longer
    busy (see Burn::Drive#status).
    * eject: true to make the drive eject the disc in it.  
    * Returns: self.

--- sao_block_types
    This method returns the supported block types in SAO mode (either Burn::BLOCK_RAW0, Burn::BLOCK_RAW16, Burn::BLOCK_RAW96P, Burn::BLOCK_RAW96R, Burn::BLOCK_MODE1, Burn::BLOCK_MODE2_PATHETIC, Burn::BLOCK_MODE2_LAME, Burn::BLOCK_MODE2_OBSCURE, Burn::BLOCK_MODE2_OK, Burn::BLOCK_MODE2R).
    * Returns: the supported block types in SAO mode (either Burn::BLOCK_RAW0, Burn::BLOCK_RAW16, Burn::BLOCK_RAW96P, Burn::BLOCK_RAW96R, Burn::BLOCK_MODE1, Burn::BLOCK_MODE2_PATHETIC, Burn::BLOCK_MODE2_LAME, Burn::BLOCK_MODE2_OBSCURE, Burn::BLOCK_MODE2_OK, Burn::BLOCK_MODE2R).

--- set_speed(read, write)
    Sets drive read and write speed.
    * read: read speed in k/s (0 is max). 
    * write: write speed in k/s (0 is max).  
    * Returns: self.

--- status
    Gets the status of the drive.
    * Returns: a drive status (either Burn::Drive::STATUS_IDLE,  Burn::Drive::STATUS_SPAWNING, Burn::Drive::STATUS_READING, Burn::Drive::STATUS_WRITING, Burn::Drive::STATUS_WRITING_LEADIN, Burn::Drive::STATUS_WRITING_LEADOUT, Burn::Drive::STATUS_ERASING or Burn::Drive::STATUS_GRABBING).

--- tao_block_types
    This method returns the supported block types in TAO mode (either Burn::BLOCK_RAW0, Burn::BLOCK_RAW16, Burn::BLOCK_RAW96P, Burn::BLOCK_RAW96R, Burn::BLOCK_MODE1, Burn::BLOCK_MODE2_PATHETIC, Burn::BLOCK_MODE2_LAME, Burn::BLOCK_MODE2_OBSCURE, Burn::BLOCK_MODE2_OK, Burn::BLOCK_MODE2R).
    * Returns: the supported block types in TAO mode (either Burn::BLOCK_RAW0, Burn::BLOCK_RAW16, Burn::BLOCK_RAW96P, Burn::BLOCK_RAW96R, Burn::BLOCK_MODE1, Burn::BLOCK_MODE2_PATHETIC, Burn::BLOCK_MODE2_LAME, Burn::BLOCK_MODE2_OBSCURE, Burn::BLOCK_MODE2_OK, Burn::BLOCK_MODE2R).

--- vendor
    This method returns the name of the vendor of the drive.
    * Returns: the name of the vendor of the drive.

--- write_speed
    This method returns maximum write speed for a drive in k/s.
    * Returns: maximum write speed for a drive in k/s.

== Constants
--- STATUS_ERASING
    The drive is erasing a disc.

--- STATUS_GRABBING
    The drive is being grabbed.

--- STATUS_IDLE
    The drive is not in an operation.

--- STATUS_READING
    The drive is reading data from a disc.

--- STATUS_SPAWNING
    The library is spawning the processes to handle a pending
    operation (A read/write/etc is about to start but hasn't quite
    yet)

--- STATUS_WRITING
    The drive is writing data to a disc.

--- STATUS_WRITING_LEADIN
    The drive is writing Lead-In.

--- STATUS_WRITING_LEADOUT
    The drive is writing Lead-Out.

== See Also
((<Burn>)).

- ((<lrz>))
