@@ -177,6 +177,8 @@ pub trait MetadataExt {
177
177
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
178
178
fn mode ( & self ) -> u32 ;
179
179
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
180
+ fn nlink ( & self ) -> u64 ;
181
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
180
182
fn uid ( & self ) -> u32 ;
181
183
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
182
184
fn gid ( & self ) -> u32 ;
@@ -194,6 +196,10 @@ pub trait MetadataExt {
194
196
fn ctime ( & self ) -> i64 ;
195
197
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
196
198
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 ;
197
203
}
198
204
199
205
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
@@ -207,6 +213,9 @@ impl MetadataExt for fs::Metadata {
207
213
fn mode ( & self ) -> u32 {
208
214
self . as_inner ( ) . as_inner ( ) . st_mode as u32
209
215
}
216
+ fn nlink ( & self ) -> u64 {
217
+ self . as_inner ( ) . as_inner ( ) . st_nlink as u64
218
+ }
210
219
fn uid ( & self ) -> u32 {
211
220
self . as_inner ( ) . as_inner ( ) . st_uid as u32
212
221
}
@@ -234,6 +243,12 @@ impl MetadataExt for fs::Metadata {
234
243
fn ctime_nsec ( & self ) -> i64 {
235
244
self . as_inner ( ) . as_inner ( ) . st_ctime_nsec as i64
236
245
}
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
+ }
237
252
}
238
253
239
254
/// Add special Redox types (block/char device, fifo and socket)
0 commit comments