Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: update docs for change_time ext and doc links #130168

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: removing supporting links in favor of existing doc-comment style
juliusl committed Sep 9, 2024
commit a0a89e55387dc4291442e5fc401bd1e35b94fbe8
19 changes: 6 additions & 13 deletions library/std/src/os/windows/fs.rs
Original file line number Diff line number Diff line change
@@ -472,21 +472,14 @@ pub trait MetadataExt {
#[unstable(feature = "windows_by_handle", issue = "63010")]
fn file_index(&self) -> Option<u64>;

/// Returns the value of the `ChangeTime{Low,High}` field from the
/// [`FILE_BASIC_INFO`] struct associated with the current file handle.
/// [`ChangeTime`] is the last time file metadata was changed, such as
/// renames, attributes, etc.
/// Returns the value of the `ChangeTime{Low,High}` fields of this metadata.
///
/// This will return `None` if `Metadata` was populated without access to
/// [`FILE_BASIC_INFO`]. For example, the result of `std::fs::read_dir`
/// will be derived from [`WIN32_FIND_DATA`] which does not have access to
/// `ChangeTime`.
/// `ChangeTime` is the last time file metadata was changed, such as
/// renames, attributes, etc.
///
/// [`FILE_BASIC_INFO`]: https://learn.microsoft.com/windows/win32/api/winbase/ns-winbase-file_basic_info
/// [`WIN32_FIND_DATA`]: https://learn.microsoft.com/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw
/// [`FindFirstFile`]: https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-findfirstfilea
/// [`FindNextFile`]: https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-findnextfilea
/// [`ChangeTime`]: https://devblogs.microsoft.com/oldnewthing/20100709-00/?p=13463.
/// This will return `None` if `Metadata` instance was created from a call to
/// `DirEntry::metadata` or if the `target_vendor` is outside the current platform
/// support for this api.
#[unstable(feature = "windows_change_time", issue = "121478")]
fn change_time(&self) -> Option<u64>;
}