eject 0.1.0

A crate for controlling the tray of your CD drive
Documentation

Eject

Crates.io api-docs

A Rust library for controlling your CD drive's tray.

Currently supports Windows and Linux.

Example

use eject::{device::Device, discovery::first_cdrom};

// Find a drive by path
let cdrom = Device::open("/dev/cdrom").unwrap();
// Or let the crate find one for you
let cdrom = first_cdrom().unwrap();
// Open the drive's tray
cdrom.eject().unwrap();