-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add creation_time API #134
Conversation
Finally I can make green Linux tests in travis :) the only one build remaining in travis, it is Mac OSX |
@Lastique Thanks for review my code I try to resolve all comments and support all desired platforms. so I happy to review it again. Thanks |
@Lastique I need this feature, so I thankful for review it :) |
if (error(::stat(p.c_str(), &path_stat) != 0 ? BOOST_ERRNO : 0, p, ec, | ||
"boost::filesystem::creation_time")) | ||
return std::time_t(-1); | ||
return std::time_t(path_stat.st_birthtim.tv_sec); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, st_birthtime
is a more portable way to access this field instead of st_birthtim.tv_sec
. Also, NetBSD seems to support it as well: https://netbsd.gw.com/cgi-bin/man-cgi?stat+2.i386+NetBSD-8.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is only work, when _POSIX_SOURCE not defined, so I think it is dangerous to use this.
Please see https://www.freebsd.org/cgi/man.cgi?query=stat&sektion=2
@Lastique I am sorry for my long delay, but I think I resolves many of your comment, and you can review it again. thanks a lot |
Thanks for your work. I have looked through your code and there were issues with it. For example, you are not checking the |
ITNOA
This PR resolved #133
I added support for below platform
I add another platform in coming days.
I would be happy to review my PR.
thanks a lot