Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys.FileStat.ctime updated with more accurate file creation time #1063

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 11, 2023

  1. sys.FileStat.ctime updated with more accurate file creation time

    Linux: Uses statx syscall on Linux to get stx_btime.tv_sec for this field only
    macOS: Still uses the existing stat syscall, but accesses the macOS-only st_birthtime field instead
    
    Historically, the POSIX standard did not require file systems to store the file creation time at all, so the stat syscall did not provide it. Modern file systems now store this value, and different operating systems provide it in different ways. The previous value of ctime from the stat syscall is actually the "status change time". This value may initially match the file creation time, but it can be updated after the file is modified in certain ways (including the file size changing, which is very common). The new value is more accurate, better matching how Haxe documents this field.
    joshtynjala committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    dda72bd View commit details
    Browse the repository at this point in the history