stat.ctime refers to change time, not creation time.
In fact, POSIX does not provide a way to retrieve the creation time.
However, since Linux 4.11, there is a new statx system call, which provides
stx_btime as the creation (birth) time.
The JVM’s UnixFileAttributes.creationTime() already checks whether the birth
time is available and, if it is, returns it. Otherwise, it falls back to
mtime, not ctime.
See:
https://github.com/openjdk/jdk/blob/master/src/java.base/unix/classes/sun/nio/fs/UnixFileAttributes.java#L176
Note: It seems like macOS already provides a true file creation time via st_birthtimespec
in the original stat struct.