1 // Take a look at the license at the top of the repository in the LICENSE file.
2 
3 use crate::UnixMountPoint;
4 use glib::translate::*;
5 use std::mem;
6 
7 impl UnixMountPoint {
8     #[cfg(any(unix, feature = "dox"))]
9     #[doc(alias = "g_unix_mount_points_get")]
10     #[doc(alias = "get_mount_points")]
mount_points() -> (Vec<UnixMountPoint>, u64)11     pub fn mount_points() -> (Vec<UnixMountPoint>, u64) {
12         unsafe {
13             let mut time_read = mem::MaybeUninit::uninit();
14             let ret = FromGlibPtrContainer::from_glib_full(ffi::g_unix_mount_points_get(
15                 time_read.as_mut_ptr(),
16             ));
17             let time_read = time_read.assume_init();
18             (ret, time_read)
19         }
20     }
21 
22     #[doc(alias = "g_unix_mount_points_changed_since")]
is_changed_since(time: u64) -> bool23     pub fn is_changed_since(time: u64) -> bool {
24         unsafe { from_glib(ffi::g_unix_mount_points_changed_since(time)) }
25     }
26 }
27