apple / swift-nio

Event-driven network application framework for high performance protocol servers & clients, non-blocking.
https://swiftpackageindex.com/apple/swift-nio/documentation
Apache License 2.0
7.85k stars 633 forks source link

Add API for setting last accessed and last modified file times #2735

Closed gjcairo closed 3 weeks ago

gjcairo commented 1 month ago

This PR adds API to set a file's last accessed and last modified times, as well as a touch() shorthand that updates both to the current time.

Motivation:

Feature request: https://github.com/apple/swift-nio/issues/2712

Modifications:

This PR adds API to set a file's last accessed and last modified times, as well as a touch() shorthand that updates both to the current time.

Result:

Files' last accessed and last modified times can be updated.

glbrntt commented 4 weeks ago

API breakage is expected, we're adding requirements to a protocol, but that's okay NIOFileSystem isn't stable API yet.

glbrntt commented 3 weeks ago

@swift-server-bot test this please