use std::fs::Metadata;

#[derive(Hash, Eq, PartialEq, Debug, Copy, Clone)]
pub struct FileDescriptor {
    dev: u64,
    ino: u64,
}

impl FileDescriptor {
    pub fn from_metadata(metadata: Metadata) -> FileDescriptor {
        let dev = metadata.st_dev();
        let ino = metadata.st_ino();

        FileDescriptor { dev, ino }
    }
}
