@@ -34,36 +34,55 @@ pub trait MetadataExt {
34
34
#[ allow( deprecated) ]
35
35
fn as_raw_stat ( & self ) -> & raw:: stat ;
36
36
37
+ /// Returns the device ID on which this file resides.
37
38
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
38
39
fn st_dev ( & self ) -> u64 ;
40
+ /// Returns the inode number.
39
41
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
40
42
fn st_ino ( & self ) -> u64 ;
43
+ /// Returns the file type and mode.
41
44
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
42
45
fn st_mode ( & self ) -> u32 ;
46
+ /// Returns the number of hard links to file.
43
47
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
44
48
fn st_nlink ( & self ) -> u64 ;
49
+ /// Returns the user ID of the file owner.
45
50
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
46
51
fn st_uid ( & self ) -> u32 ;
52
+ /// Returns the group ID of the file owner.
47
53
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
48
54
fn st_gid ( & self ) -> u32 ;
55
+ /// Returns the device ID that this file represents. Only relevant for special file.
49
56
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
50
57
fn st_rdev ( & self ) -> u64 ;
58
+ /// Returns the size of the file (if it is a regular file or a symbolic link) in bytes.
59
+ ///
60
+ /// The size of a symbolic link is the length of the pathname it contains,
61
+ /// without a terminating null byte.
51
62
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
52
63
fn st_size ( & self ) -> u64 ;
64
+ /// Returns the last access time.
53
65
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
54
66
fn st_atime ( & self ) -> i64 ;
67
+ /// Returns the last access time, nano seconds part.
55
68
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
56
69
fn st_atime_nsec ( & self ) -> i64 ;
70
+ /// Returns the last modification time.
57
71
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
58
72
fn st_mtime ( & self ) -> i64 ;
73
+ /// Returns the last modification time, nano seconds part.
59
74
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
60
75
fn st_mtime_nsec ( & self ) -> i64 ;
76
+ /// Returns the last status change time.
61
77
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
62
78
fn st_ctime ( & self ) -> i64 ;
79
+ /// Returns the last status change time, nano seconds part.
63
80
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
64
81
fn st_ctime_nsec ( & self ) -> i64 ;
82
+ /// Returns the "preferred" blocksize for efficient filesystem I/O.
65
83
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
66
84
fn st_blksize ( & self ) -> u64 ;
85
+ /// Returns the number of blocks allocated to the file, 512-byte units.
67
86
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
68
87
fn st_blocks ( & self ) -> u64 ;
69
88
}
0 commit comments