maint: update docs for change_time ext and doc links · qinheping/verify-rust-std@b6f9e80 (original) (raw)
`@@ -299,7 +299,7 @@ impl OpenOptionsExt for OpenOptions {
`
299
299
`` /// of the [BY_HANDLE_FILE_INFORMATION
] structure.
``
300
300
`///
`
301
301
`` /// [BY_HANDLE_FILE_INFORMATION
]:
``
302
``
`-
/// https://docs.microsoft.com/en-us/windows/win32/api/fileapi/ns-fileapi-by_handle_file_information
`
``
302
`+
/// https://docs.microsoft.com/windows/win32/api/fileapi/ns-fileapi-by_handle_file_information
`
303
303
`#[stable(feature = "metadata_ext", since = "1.1.0")]
`
304
304
`pub trait MetadataExt {
`
305
305
`` /// Returns the value of the dwFileAttributes
field of this metadata.
``
`@@ -323,7 +323,7 @@ pub trait MetadataExt {
`
323
323
```` /// ```
`324`
`324`
`///
`
`325`
`325`
`/// [File Attribute Constants]:
`
`326`
``
`-
/// https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants
`
``
`326`
`+
/// https://docs.microsoft.com/windows/win32/fileio/file-attribute-constants
`
`327`
`327`
`#[stable(feature = "metadata_ext", since = "1.1.0")]
`
`328`
`328`
`fn file_attributes(&self) -> u32;
`
`329`
`329`
``
`@@ -352,7 +352,7 @@ pub trait MetadataExt {
`
`352`
`352`
`/// }
`
`353`
`353`
```` /// ```
354
354
`///
`
355
``
`` -
/// [FILETIME
]: https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
``
``
355
`` +
/// [FILETIME
]: https://docs.microsoft.com/windows/win32/api/minwinbase/ns-minwinbase-filetime
``
356
356
`#[stable(feature = "metadata_ext", since = "1.1.0")]
`
357
357
`fn creation_time(&self) -> u64;
`
358
358
``
`@@ -387,7 +387,7 @@ pub trait MetadataExt {
`
387
387
`/// }
`
388
388
```` /// ```
`389`
`389`
`///
`
`390`
``
`` -
/// [`FILETIME`]: https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
``
``
`390`
`` +
/// [`FILETIME`]: https://docs.microsoft.com/windows/win32/api/minwinbase/ns-minwinbase-filetime
``
`391`
`391`
`#[stable(feature = "metadata_ext", since = "1.1.0")]
`
`392`
`392`
`fn last_access_time(&self) -> u64;
`
`393`
`393`
``
`@@ -420,7 +420,7 @@ pub trait MetadataExt {
`
`420`
`420`
`/// }
`
`421`
`421`
```` /// ```
422
422
`///
`
423
``
`` -
/// [FILETIME
]: https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
``
``
423
`` +
/// [FILETIME
]: https://docs.microsoft.com/windows/win32/api/minwinbase/ns-minwinbase-filetime
``
424
424
`#[stable(feature = "metadata_ext", since = "1.1.0")]
`
425
425
`fn last_write_time(&self) -> u64;
`
426
426
``
`@@ -472,10 +472,21 @@ pub trait MetadataExt {
`
472
472
`#[unstable(feature = "windows_by_handle", issue = "63010")]
`
473
473
`fn file_index(&self) -> Option;
`
474
474
``
475
``
`-
/// Returns the change time, which is the last time file metadata was changed, such as
`
476
``
`-
/// renames, attributes, etc
`
477
``
`-
///
`
478
``
`` -
/// This will return None
if the Metadata
instance was not created using the FILE_BASIC_INFO
type.
``
``
475
`` +
/// Returns the value of the ChangeTime{Low,High}
field from the
``
``
476
`` +
/// [FILE_BASIC_INFO
] struct associated with the current file handle.
``
``
477
`` +
/// [ChangeTime
] is the last time file metadata was changed, such as
``
``
478
`+
/// renames, attributes, etc.
`
``
479
`+
///
`
``
480
`` +
/// This will return None
if Metadata
was populated without access to
``
``
481
`` +
/// [FILE_BASIC_INFO
]. For example, the result of std::fs::read_dir
``
``
482
`` +
/// will be derived from [WIN32_FIND_DATA
] which does not have access to
``
``
483
`` +
/// ChangeTime
.
``
``
484
`+
///
`
``
485
`` +
/// [FILE_BASIC_INFO
]: https://learn.microsoft.com/windows/win32/api/winbase/ns-winbase-file_basic_info
``
``
486
`` +
/// [WIN32_FIND_DATA
]: https://learn.microsoft.com/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw
``
``
487
`` +
/// [FindFirstFile
]: https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-findfirstfilea
``
``
488
`` +
/// [FindNextFile
]: https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-findnextfilea
``
``
489
`` +
/// [ChangeTime
]: https://devblogs.microsoft.com/oldnewthing/20100709-00/?p=13463.
``
479
490
`#[unstable(feature = "windows_change_time", issue = "121478")]
`
480
491
`fn change_time(&self) -> Option;
`
481
492
`}
`