@@ -43,7 +43,7 @@ macro_rules! has {
4343
4444/// Information to uniquely identify a file
4545pub struct FileInformation (
46- #[ cfg( unix) ] nix :: sys :: stat :: FileStat ,
46+ #[ cfg( unix) ] rustix :: fs :: Stat ,
4747 #[ cfg( windows) ] winapi_util:: file:: Information ,
4848 // WASI does not have nix::sys::stat, so we store std::fs::Metadata instead.
4949 #[ cfg( target_os = "wasi" ) ] fs:: Metadata ,
@@ -53,7 +53,7 @@ impl FileInformation {
5353 /// Get information from a currently open file
5454 #[ cfg( unix) ]
5555 pub fn from_file ( file : & impl AsFd ) -> IOResult < Self > {
56- let stat = nix :: sys :: stat :: fstat ( file) ?;
56+ let stat = rustix :: fs :: fstat ( file) ?;
5757 Ok ( Self ( stat) )
5858 }
5959
@@ -72,9 +72,9 @@ impl FileInformation {
7272 #[ cfg( unix) ]
7373 {
7474 let stat = if dereference {
75- nix :: sys :: stat :: stat ( path. as_ref ( ) )
75+ rustix :: fs :: stat ( path. as_ref ( ) )
7676 } else {
77- nix :: sys :: stat :: lstat ( path. as_ref ( ) )
77+ rustix :: fs :: lstat ( path. as_ref ( ) )
7878 } ;
7979 Ok ( Self ( stat?) )
8080 }
@@ -798,8 +798,7 @@ pub fn is_stdin_directory(stdin: &Stdin) -> bool {
798798 #[ cfg( unix) ]
799799 {
800800 use mode:: { S_IFDIR , S_IFMT } ;
801- use nix:: sys:: stat:: fstat;
802- let mode = fstat ( stdin. as_fd ( ) ) . unwrap ( ) . st_mode as u32 ;
801+ let mode = rustix:: fs:: fstat ( stdin. as_fd ( ) ) . unwrap ( ) . st_mode as u32 ;
803802 // We use the S_IFMT mask ala S_ISDIR() to avoid mistaking
804803 // sockets for directories.
805804 mode & S_IFMT == S_IFDIR
0 commit comments