diskarbitration_sys/
disk.rs

1use core_foundation_sys::url::CFURLRef;
2use core_foundation_sys::{base::CFAllocatorRef, dictionary::CFDictionaryRef};
3use libc::{c_char, c_void};
4
5use crate::session::DASessionRef;
6
7#[repr(C)]
8pub struct __DADisk(c_void);
9pub type DADiskRef = *const __DADisk;
10
11extern "C" {
12    pub fn DADiskCreateFromVolumePath(
13        allocator: CFAllocatorRef,
14        session: DASessionRef,
15        path: CFURLRef,
16    ) -> DADiskRef;
17    pub fn DADiskGetBSDName(disk: DADiskRef) -> *const c_char;
18    pub fn DADiskCopyDescription(disk: DADiskRef) -> CFDictionaryRef;
19}