touch

Sets the file’s last access and last data modification times to the current time.

FileHandleProtocol.swift:542
iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
func touch() async throws

Throws

If there’s an error updating the times. If this happens, the original values won’t be modified.