Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any standard way to get creation time of file or directory in FreeBSD programatically

I want to know how to get creation time of path in FreeBSD C API?

for example in Linux we can use statx since kernel 4.11, or in mac OSX we can use stat64

I want to know is there any way like above for FreeBSD? is there any POSIX standard function/syscall for this?

like image 926
sorosh_sabz Avatar asked Oct 18 '25 19:10

sorosh_sabz


1 Answers

POSIX's stat functions provide no way to get file creation time. However, FreeBSD has st_birthtim field which you can use.

From FreeBSD's stat syscall:

 st_birthtim  Time when the inode was created.
like image 119
P.P Avatar answered Oct 20 '25 09:10

P.P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!