summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/fs/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/fs/mod.rs')
-rw-r--r--vendor/rustix/src/fs/mod.rs51
1 files changed, 35 insertions, 16 deletions
diff --git a/vendor/rustix/src/fs/mod.rs b/vendor/rustix/src/fs/mod.rs
index 49b9c3b51..fa7f93aec 100644
--- a/vendor/rustix/src/fs/mod.rs
+++ b/vendor/rustix/src/fs/mod.rs
@@ -1,9 +1,7 @@
//! Filesystem operations.
-#[cfg(feature = "fs")]
mod abs;
#[cfg(not(target_os = "redox"))]
-#[cfg(any(feature = "fs", feature = "procfs"))]
mod at;
mod constants;
#[cfg(any(target_os = "android", target_os = "linux"))]
@@ -11,16 +9,17 @@ mod copy_file_range;
#[cfg(not(target_os = "redox"))]
mod cwd;
#[cfg(not(target_os = "redox"))]
-#[cfg(any(feature = "fs", feature = "procfs"))]
mod dir;
#[cfg(not(any(
target_os = "dragonfly",
+ target_os = "haiku",
target_os = "illumos",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "redox",
+ target_os = "solaris",
)))]
mod fadvise;
pub(crate) mod fcntl;
@@ -35,19 +34,20 @@ mod getpath;
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
+ target_os = "haiku",
target_os = "illumos",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "redox",
+ target_os = "solaris",
target_os = "wasi",
)))]
mod makedev;
#[cfg(any(target_os = "android", target_os = "freebsd", target_os = "linux"))]
mod memfd_create;
#[cfg(any(target_os = "android", target_os = "linux"))]
-#[cfg(feature = "fs")]
mod openat2;
#[cfg(target_os = "linux")]
mod sendfile;
@@ -55,18 +55,25 @@ mod sendfile;
mod statx;
#[cfg(not(any(
+ target_os = "haiku",
target_os = "illumos",
target_os = "netbsd",
target_os = "redox",
+ target_os = "solaris",
target_os = "wasi",
)))]
-#[cfg(feature = "fs")]
pub use abs::statfs;
-#[cfg(not(any(target_os = "illumos", target_os = "redox")))]
-#[cfg(feature = "fs")]
+#[cfg(not(any(
+ target_os = "haiku",
+ target_os = "illumos",
+ target_os = "redox",
+ target_os = "solaris",
+ target_os = "wasi",
+)))]
+pub use abs::statvfs;
+#[cfg(not(any(target_os = "illumos", target_os = "redox", target_os = "solaris")))]
pub use at::accessat;
#[cfg(any(target_os = "ios", target_os = "macos"))]
-#[cfg(feature = "fs")]
pub use at::fclonefileat;
#[cfg(not(any(
target_os = "ios",
@@ -74,16 +81,12 @@ pub use at::fclonefileat;
target_os = "redox",
target_os = "wasi",
)))]
-#[cfg(feature = "fs")]
pub use at::mknodat;
#[cfg(any(target_os = "android", target_os = "linux"))]
-#[cfg(feature = "fs")]
pub use at::renameat_with;
#[cfg(not(any(target_os = "redox", target_os = "wasi")))]
-#[cfg(feature = "fs")]
pub use at::{chmodat, chownat};
#[cfg(not(target_os = "redox"))]
-#[cfg(any(feature = "fs", feature = "procfs"))]
pub use at::{
linkat, mkdirat, openat, readlinkat, renameat, statat, symlinkat, unlinkat, utimensat, RawMode,
UTIME_NOW, UTIME_OMIT,
@@ -105,16 +108,17 @@ pub use copy_file_range::copy_file_range;
#[cfg(not(target_os = "redox"))]
pub use cwd::cwd;
#[cfg(not(target_os = "redox"))]
-#[cfg(any(feature = "fs", feature = "procfs"))]
pub use dir::{Dir, DirEntry};
#[cfg(not(any(
target_os = "dragonfly",
+ target_os = "haiku",
target_os = "illumos",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "redox",
+ target_os = "solaris",
)))]
pub use fadvise::{fadvise, Advice};
#[cfg(not(target_os = "wasi"))]
@@ -136,30 +140,44 @@ pub use fcopyfile::{
};
#[cfg(not(any(
target_os = "dragonfly",
+ target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "redox",
)))]
pub use fd::fdatasync;
#[cfg(not(any(
+ target_os = "aix",
target_os = "dragonfly",
target_os = "illumos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "redox",
+ target_os = "solaris",
)))]
pub use fd::{fallocate, FallocateFlags};
#[cfg(not(target_os = "wasi"))]
-pub use fd::{fchmod, fchown, flock, FlockOperation};
+pub use fd::{fchmod, fchown};
+#[cfg(not(any(target_os = "solaris", target_os = "wasi")))]
+pub use fd::{flock, FlockOperation};
pub use fd::{fstat, fsync, ftruncate, futimens, is_file_read_write, seek, tell, Stat, Timestamps};
#[cfg(not(any(
+ target_os = "haiku",
target_os = "illumos",
target_os = "netbsd",
target_os = "redox",
+ target_os = "solaris",
target_os = "wasi",
)))]
-// not implemented in libc for netbsd yet
pub use fd::{fstatfs, StatFs};
+#[cfg(not(any(
+ target_os = "haiku",
+ target_os = "illumos",
+ target_os = "redox",
+ target_os = "solaris",
+ target_os = "wasi",
+)))]
+pub use fd::{fstatvfs, StatVfs, StatVfsMountFlags};
#[cfg(any(target_os = "android", target_os = "linux"))]
pub use fd::{FsWord, NFS_SUPER_MAGIC, PROC_SUPER_MAGIC};
pub use file_type::FileType;
@@ -168,19 +186,20 @@ pub use getpath::getpath;
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
+ target_os = "haiku",
target_os = "illumos",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "redox",
+ target_os = "solaris",
target_os = "wasi",
)))]
pub use makedev::{major, makedev, minor};
#[cfg(any(target_os = "android", target_os = "freebsd", target_os = "linux"))]
pub use memfd_create::{memfd_create, MemfdFlags};
#[cfg(any(target_os = "android", target_os = "linux"))]
-#[cfg(feature = "fs")]
pub use openat2::openat2;
#[cfg(target_os = "linux")]
pub use sendfile::sendfile;