summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/fs/abs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/fs/abs.rs')
-rw-r--r--vendor/rustix/src/fs/abs.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/rustix/src/fs/abs.rs b/vendor/rustix/src/fs/abs.rs
new file mode 100644
index 000000000..25556304b
--- /dev/null
+++ b/vendor/rustix/src/fs/abs.rs
@@ -0,0 +1,33 @@
+//! POSIX-style filesystem functions which operate on bare paths.
+
+#[cfg(not(any(
+ target_os = "illumos",
+ target_os = "netbsd",
+ target_os = "redox",
+ target_os = "wasi",
+)))]
+use crate::fs::StatFs;
+#[cfg(not(any(
+ target_os = "illumos",
+ target_os = "netbsd",
+ target_os = "redox",
+ target_os = "wasi",
+)))]
+use crate::{imp, io, path};
+
+/// `statfs`—Queries filesystem metadata.
+///
+/// # References
+/// - [Linux]
+///
+/// [Linux]: https://man7.org/linux/man-pages/man2/statfs.2.html
+#[cfg(not(any(
+ target_os = "illumos",
+ target_os = "netbsd",
+ target_os = "redox",
+ target_os = "wasi",
+)))]
+#[inline]
+pub fn statfs<P: path::Arg>(path: P) -> io::Result<StatFs> {
+ path.into_with_c_str(imp::fs::syscalls::statfs)
+}