On 2024-01-15 12:34, Cedric Blancher via Cygwin wrote:
> Does Cygwin support the btime/birth time?

$ stat                  /bin/cygwin1.dll
  File: /bin/cygwin1.dll
  Size: 2954293         Blocks: 2888       IO Block: 65536  regular file
Device: 60997,17217     Inode: 2533274790402854  Links: 1
...
Access: 2024-01-15 23:25:48.044890100 -0700
Modify: 2023-11-29 05:20:00.000000000 -0700
Change: 2023-12-15 11:11:24.000010700 -0700
 Birth: 2023-12-15 11:11:23.930989200 -0700
$ stat -t               /bin/cygwin1.dll
/bin/cygwin1.dll 2954293 2888 81ed ... ee454341 2533274790402854 1 0 0 1705387136 1701260400 1702663884 1702663883 65536
$ stat -c %W\ %w        /bin/cygwin1.dll
1702663883 2023-12-15 11:11:23.930989200 -0700
$ grep stat.h /usr/include/sys/stat.h
#include <cygwin/stat.h>
$ grep 'stat\|b.*tim' /usr/include/cygwin/stat.h
/* cygwin/stat.h
struct stat
  timestruc_t   st_birthtim;
#define st_birthtime st_birthtim.tv_sec

As per docs, "#include <sys/stat.h>"

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                -- Antoine de Saint-Exupéry

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to