From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/fs/abs.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 vendor/rustix/src/fs/abs.rs (limited to 'vendor/rustix/src/fs/abs.rs') 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(path: P) -> io::Result { + path.into_with_c_str(imp::fs::syscalls::statfs) +} -- cgit v1.2.3