Skip to content

File::set_times: Update documentation and example to support setting timestamps on directories #144975

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joshtriplett
Copy link
Member

Inspired by #123883 .

@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 5, 2025
Copy link
Contributor

@Kivooeo Kivooeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor rewording suggestion

Comment on lines +1114 to +1116
/// On most platforms, including UNIX and Windows platforms, this function can also change the
/// timestamps of a directory. To do so, open the directory with `File::open`, without
/// attempting to obtain write permission.
Copy link
Contributor

@Kivooeo Kivooeo Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// On most platforms, including UNIX and Windows platforms, this function can also change the
/// timestamps of a directory. To do so, open the directory with `File::open`, without
/// attempting to obtain write permission.
/// On most UNIX and Windows platforms, this function can also update a directory’s timestamps.
/// To do so, open the directory with `File::open` without requesting write permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants