Example #1
0
// ModTime retrieves the last modification time of the given file.
func (c File) ModTime() time.Time {
	// time_t is in seconds since epoch
	sec := C.clang_getFileTime(c.c)
	const nsec = 0
	return time.Unix(int64(sec), nsec)
}
Example #2
0
// Retrieve the last modification time of the given file.
func (f File) Time() time.Time {
	return time.Unix(int64(C.clang_getFileTime(f.c)), 0)
}