@@ -177,6 +177,8 @@ pub trait MetadataExt {
177177 #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
178178 fn mode ( & self ) -> u32 ;
179179 #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
180+ fn nlink ( & self ) -> u64 ;
181+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
180182 fn uid ( & self ) -> u32 ;
181183 #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
182184 fn gid ( & self ) -> u32 ;
@@ -194,6 +196,10 @@ pub trait MetadataExt {
194196 fn ctime ( & self ) -> i64 ;
195197 #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
196198 fn ctime_nsec ( & self ) -> i64 ;
199+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
200+ fn blksize ( & self ) -> u64 ;
201+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
202+ fn blocks ( & self ) -> u64 ;
197203}
198204
199205#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
@@ -207,6 +213,9 @@ impl MetadataExt for fs::Metadata {
207213 fn mode ( & self ) -> u32 {
208214 self . as_inner ( ) . as_inner ( ) . st_mode as u32
209215 }
216+ fn nlink ( & self ) -> u64 {
217+ self . as_inner ( ) . as_inner ( ) . st_nlink as u64
218+ }
210219 fn uid ( & self ) -> u32 {
211220 self . as_inner ( ) . as_inner ( ) . st_uid as u32
212221 }
@@ -234,6 +243,12 @@ impl MetadataExt for fs::Metadata {
234243 fn ctime_nsec ( & self ) -> i64 {
235244 self . as_inner ( ) . as_inner ( ) . st_ctime_nsec as i64
236245 }
246+ fn blksize ( & self ) -> u64 {
247+ self . as_inner ( ) . as_inner ( ) . st_blksize as u64
248+ }
249+ fn blocks ( & self ) -> u64 {
250+ self . as_inner ( ) . as_inner ( ) . st_blocks as u64
251+ }
237252}
238253
239254/// Add special Redox types (block/char device, fifo and socket)
0 commit comments