Rollup merge of #112328 - juliusl:pr/windows-add-change-time, r=ChrisDenton
Feat. adding ext that returns change_time Addresses #112327
This commit is contained in:
commit
45e4e96385
2 changed files with 21 additions and 0 deletions
|
|
@ -471,6 +471,13 @@ pub trait MetadataExt {
|
|||
/// `fs::metadata` or `File::metadata`, then this will return `Some`.
|
||||
#[unstable(feature = "windows_by_handle", issue = "63010")]
|
||||
fn file_index(&self) -> Option<u64>;
|
||||
|
||||
/// Returns the change time, which is the last time file metadata was changed, such as
|
||||
/// renames, attributes, etc
|
||||
///
|
||||
/// This will return `None` if the `Metadata` instance was not created using the `FILE_BASIC_INFO` type.
|
||||
#[unstable(feature = "windows_change_time", issue = "121478")]
|
||||
fn change_time(&self) -> Option<u64>;
|
||||
}
|
||||
|
||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||
|
|
@ -499,6 +506,9 @@ impl MetadataExt for Metadata {
|
|||
fn file_index(&self) -> Option<u64> {
|
||||
self.as_inner().file_index()
|
||||
}
|
||||
fn change_time(&self) -> Option<u64> {
|
||||
self.as_inner().changed_u64()
|
||||
}
|
||||
}
|
||||
|
||||
/// Windows-specific extensions to [`fs::FileType`].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue