@@ -34,36 +34,55 @@ pub trait MetadataExt {
3434 #[ allow( deprecated) ]
3535 fn as_raw_stat ( & self ) -> & raw:: stat ;
3636
37+ /// Returns the device ID on which this file resides.
3738 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
3839 fn st_dev ( & self ) -> u64 ;
40+ /// Returns the inode number.
3941 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
4042 fn st_ino ( & self ) -> u64 ;
43+ /// Returns the file type and mode.
4144 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
4245 fn st_mode ( & self ) -> u32 ;
46+ /// Returns the number of hard links to file.
4347 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
4448 fn st_nlink ( & self ) -> u64 ;
49+ /// Returns the user ID of the file owner.
4550 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
4651 fn st_uid ( & self ) -> u32 ;
52+ /// Returns the group ID of the file owner.
4753 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
4854 fn st_gid ( & self ) -> u32 ;
55+ /// Returns the device ID that this file represents. Only relevant for special file.
4956 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
5057 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.
5162 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
5263 fn st_size ( & self ) -> u64 ;
64+ /// Returns the last access time.
5365 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
5466 fn st_atime ( & self ) -> i64 ;
67+ /// Returns the last access time, nano seconds part.
5568 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
5669 fn st_atime_nsec ( & self ) -> i64 ;
70+ /// Returns the last modification time.
5771 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
5872 fn st_mtime ( & self ) -> i64 ;
73+ /// Returns the last modification time, nano seconds part.
5974 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6075 fn st_mtime_nsec ( & self ) -> i64 ;
76+ /// Returns the last status change time.
6177 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6278 fn st_ctime ( & self ) -> i64 ;
79+ /// Returns the last status change time, nano seconds part.
6380 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6481 fn st_ctime_nsec ( & self ) -> i64 ;
82+ /// Returns the "preferred" blocksize for efficient filesystem I/O.
6583 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6684 fn st_blksize ( & self ) -> u64 ;
85+ /// Returns the number of blocks allocated to the file, 512-byte units.
6786 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6887 fn st_blocks ( & self ) -> u64 ;
6988}
0 commit comments