Open
Description
In Windows, there's a field in FILE_BASIC_INFO called ChangeTime that tracks when file metadata is changed, such as renaming, file attributes, etc.
Currently, this property isn't included in the ::sys::windows::fs::FileAttr implementation, but is available in the c::FILE_BASIC_INFO impl.
Last write time (which is currently provided) is the last time the data stream changed, and this value represents a different time value.
This change adds a method change_time()
to the MetadataExt
trait in order to provide this value.
Public API
fn windows_change_time() {
let meta = std::fs::metadata("example.txt").unwrap();
// Returns Option<u64> since this is only available if FILE_BASIC_INFO is the backing type of `.inner()`
let change_time = meta.change_time();
}
Steps / History
- Implementation: Feat. adding ext that returns change_time #112328
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.