Skip to content

Use st_birthtimespec instead of st_ctim.tv_sec on Darwin#1648

Open
SiliconA-Z wants to merge 1 commit intoswiftlang:mainfrom
SiliconA-Z:okay
Open

Use st_birthtimespec instead of st_ctim.tv_sec on Darwin#1648
SiliconA-Z wants to merge 1 commit intoswiftlang:mainfrom
SiliconA-Z:okay

Conversation

@SiliconA-Z
Copy link
Copy Markdown
Contributor

st_ctim records the last time the inode changed. Closest thing on linux, but st_birthtimespec is what we actually want here.

st_ctim records the last time the inode changed. Closest thing on linux, but st_birthtimespec is what we actually want here.
@jmschonfeld jmschonfeld self-requested a review January 13, 2026 22:51
}
#endif

@Test(.enabled(if: isDarwin, "Birth time is only exposed on Darwin"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason that we should limit this test to Darwin platforms? I know Darwin platforms are the ones that don't pass this test today, but we should expect platforms like Linux and Windows to pass this test as well, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants