Support setting file accessed/modified timestamps#98246
Support setting file accessed/modified timestamps#98246bors merged 7 commits intorust-lang:masterfrom
Conversation
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
af110f4 to
8f3fc2e
Compare
|
@bors r+ |
|
📌 Commit 8f3fc2e5de8d702b93bb5cf1432630ab721f78d8 has been approved by |
|
@bors r- Actually, |
|
@bors r+ |
|
📌 Commit 585767d has been approved by |
Support setting file accessed/modified timestamps Add `struct FileTimes` to contain the relevant file timestamps, since most platforms require setting all of them at once. (This also allows for future platform-specific extensions such as setting creation time.) Add `File::set_file_time` to set the timestamps for a `File`. Implement the `sys` backends for UNIX, macOS (which needs to fall back to `futimes` before macOS 10.13 because it lacks `futimens`), Windows, and WASI.
|
Failed in rollup: #98347 (comment) |
This comment has been minimized.
This comment has been minimized.
Redox doesn't appear to support `UTIME_OMIT`, so we can't set file times individually.
|
@bors r=m-ou-se |
|
⌛ Testing commit 11d9be6 with merge da0c22e89b671e47e40ae8382a0f78a1d7b7a9c7... |
|
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
@bors r=m-ou-se |
|
⌛ Testing commit f8061dd with merge eb5c3654b416912da280a0808ac36499e50d3bfe... |
|
💥 Test timed out |
|
@bors retry |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (1f5d8d4): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Add
struct FileTimesto contain the relevant file timestamps, sincemost platforms require setting all of them at once. (This also allows
for future platform-specific extensions such as setting creation time.)
Add
File::set_file_timeto set the timestamps for aFile.Implement the
sysbackends for UNIX, macOS (which needs to fall backto
futimesbefore macOS 10.13 because it lacksfutimens), Windows,and WASI.