Instance Methodswift-nio 2.72.0_NIOFileSystem
touch
Sets the file’s last access and last data modification times to the current time.
FileHandleProtocol.swift:537- 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.
Other members in extension
Instance members
func setLastAccessTime(to: FileInfo.Timespec
) async throws Sets the file’s last access time to the given time.
func setLastDataModificationTime(to: FileInfo.Timespec
) async throws Sets the file’s last data modification time to the given time.