Hello there, I’ve just tried using os.lstat() like so, to get some file information-
file_info, lstat_error := os.lstat(file_name)
.
However, I noticed that the creation and modification time stamps reported by the os.lstat function were the same.
I went into a file manager, and checked that the correct creation timestamp was there (it was).
After some digging, I stumbled across the Wikipedia page for ext4.
The TLDR seems to be that on ext4 systems, the way to get the file creation time is to use the statx
syscall instead of stat
.
Is there a reason os.lstat
does not use this, or am I simply using the wrong function?
Thanks