For the same reason we have this method on `Repo`.
use crate::gio;
use crate::Sysroot;
+#[cfg(any(feature = "v2017_10", feature = "dox"))]
+use std::os::fd::BorrowedFd;
use std::path::PathBuf;
#[derive(Clone, Debug, Default)]
}
}
+impl Sysroot {
+ /// Borrow the directory file descriptor for this sysroot.
+ #[cfg(feature = "v2017_10")]
+ pub fn dfd_borrow(&self) -> BorrowedFd {
+ unsafe { BorrowedFd::borrow_raw(self.fd()) }
+ }
+}
+
#[cfg(test)]
mod tests {
use super::*;