Skip to content

Is there a os.utime() that doesn't follow links? #21508

Discussion options

You must be logged in to vote

I was able to resolve the issue by using the data member of Array.

fn lutime(path string, actime int, modtime int) ! {
 	times := [C.timeval{u64(actime), u64(0)}, C.timeval{u64(modtime), u64(0)}]
	if C.lutimes(&char(path.str), voidptr(times.data)) != 0 {
		return error('lutime failed (${C.errno})')
	}
}

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mike-ward
Comment options

You must be logged in to vote
2 replies
@mike-ward
Comment options

@JalonSolov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants