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/// Determines if @device_path is considered a block device path which is only
31/// used in implementation of the OS.
32///
33/// This is primarily used for hiding mounted volumes that are intended as APIs
34/// for programs to read, and system administrators at a shell; rather than
35/// something that should, for example, appear in a GUI. For example, the Linux
36/// `/proc` filesystem.
37///
38/// The list of device paths considered ‘system’ ones may change over time.
39/// ## `device_path`
40/// a device path, e.g. `/dev/loop0` or `nfsd`
41///
42/// # Returns
43///
44/// true if @device_path is considered an implementation detail of
45///    the OS; false otherwise
46#[doc(alias = "g_unix_is_system_device_path")]
47pub fn is_system_device_path(device_path: &str) -> bool {
48    unsafe {
49        from_glib(ffi::g_unix_is_system_device_path(
50            device_path.to_glib_none().0,
51        ))
52    }
53}
54
55/// Determines if @fs_type is considered a type of file system which is only
56/// used in implementation of the OS.
57///
58/// This is primarily used for hiding mounted volumes that are intended as APIs
59/// for programs to read, and system administrators at a shell; rather than
60/// something that should, for example, appear in a GUI. For example, the Linux
61/// `/proc` filesystem.
62///
63/// The list of file system types considered ‘system’ ones may change over time.
64/// ## `fs_type`
65/// a file system type, e.g. `procfs` or `tmpfs`
66///
67/// # Returns
68///
69/// true if @fs_type is considered an implementation detail of the OS;
70///    false otherwise
71#[doc(alias = "g_unix_is_system_fs_type")]
72pub fn is_system_fs_type(fs_type: &str) -> bool {
73    unsafe { from_glib(ffi::g_unix_is_system_fs_type(fs_type.to_glib_none().0)) }
74}