gio_unix/auto/functions.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::ffi;
6use glib::translate::*;
7
8/// Determines if @mount_path is considered an implementation of the
9/// OS.
10///
11/// This is primarily used for hiding mountable and mounted volumes
12/// that only are used in the OS and has little to no relevance to the
13/// casual user.
14/// ## `mount_path`
15/// a mount path, e.g. `/media/disk` or `/usr`
16///
17/// # Returns
18///
19/// true if @mount_path is considered an implementation detail
20/// of the OS; false otherwise
21#[doc(alias = "g_unix_is_mount_path_system_internal")]
22pub fn is_mount_path_system_internal(mount_path: impl AsRef<std::path::Path>) -> bool {
23 unsafe {
24 from_glib(ffi::g_unix_is_mount_path_system_internal(
25 mount_path.as_ref().to_glib_none().0,
26 ))
27 }
28}
29
30/// ones may change over time.
31/// ## `device_path`
32/// a device path, e.g. `/dev/loop0` or `nfsd`
33///
34/// # Returns
35///
36/// true if @device_path is considered an implementation detail of
37/// the OS; false otherwise
38#[doc(alias = "g_unix_is_system_device_path")]
39pub fn is_system_device_path(device_path: &str) -> bool {
40 unsafe {
41 from_glib(ffi::g_unix_is_system_device_path(
42 device_path.to_glib_none().0,
43 ))
44 }
45}
46
47/// ones may change over time.
48/// ## `fs_type`
49/// a file system type, e.g. `procfs` or `tmpfs`
50///
51/// # Returns
52///
53/// true if @fs_type is considered an implementation detail of the OS;
54/// false otherwise
55#[doc(alias = "g_unix_is_system_fs_type")]
56pub fn is_system_fs_type(fs_type: &str) -> bool {
57 unsafe { from_glib(ffi::g_unix_is_system_fs_type(fs_type.to_glib_none().0)) }
58}