@@ -32,6 +32,7 @@ pub struct FileAttr {
3232 creation_time : c:: FILETIME ,
3333 last_access_time : c:: FILETIME ,
3434 last_write_time : c:: FILETIME ,
35+ change_time : Option < c:: FILETIME > ,
3536 file_size : u64 ,
3637 reparse_tag : u32 ,
3738 volume_serial_number : Option < u32 > ,
@@ -377,6 +378,7 @@ impl File {
377378 creation_time : info. ftCreationTime ,
378379 last_access_time : info. ftLastAccessTime ,
379380 last_write_time : info. ftLastWriteTime ,
381+ change_time : None , // Only available in FILE_BASIC_INFO
380382 file_size : ( info. nFileSizeLow as u64 ) | ( ( info. nFileSizeHigh as u64 ) << 32 ) ,
381383 reparse_tag,
382384 volume_serial_number : Some ( info. dwVolumeSerialNumber ) ,
@@ -413,6 +415,10 @@ impl File {
413415 dwLowDateTime : info. LastWriteTime as u32 ,
414416 dwHighDateTime : ( info. LastWriteTime >> 32 ) as u32 ,
415417 } ,
418+ change_time : Some ( c:: FILETIME {
419+ dhLowDateTime : info. ChangeTime as c:: DWORD ,
420+ dhHighDateTime : ( info. ChangeTime >> 32 ) as c:: DWORD ,
421+ } ) ,
416422 file_size : 0 ,
417423 reparse_tag : 0 ,
418424 volume_serial_number : None ,
@@ -957,6 +963,10 @@ impl FileAttr {
957963 to_u64 ( & self . creation_time )
958964 }
959965
966+ pub fn changed_u64 ( & self ) -> Option < u64 > {
967+ self . change_time . as_ref ( ) . map ( |c| to_u64 ( c) )
968+ }
969+
960970 pub fn volume_serial_number ( & self ) -> Option < u32 > {
961971 self . volume_serial_number
962972 }
@@ -976,6 +986,7 @@ impl From<c::WIN32_FIND_DATAW> for FileAttr {
976986 creation_time : wfd. ftCreationTime ,
977987 last_access_time : wfd. ftLastAccessTime ,
978988 last_write_time : wfd. ftLastWriteTime ,
989+ change_time : None ,
979990 file_size : ( ( wfd. nFileSizeHigh as u64 ) << 32 ) | ( wfd. nFileSizeLow as u64 ) ,
980991 reparse_tag : if wfd. dwFileAttributes & c:: FILE_ATTRIBUTE_REPARSE_POINT != 0 {
981992 // reserved unless this is a reparse point
0 commit comments