From: naruse@... Date: 2014-03-17T05:13:51+00:00 Subject: [ruby-dev:48048] [ruby-trunk - Feature #9647] [Assigned] File::Stat#birthtimeの追加 Issue #9647 has been reported by Yui NARUSE. ---------------------------------------- Feature #9647: File::Stat#birthtimeの追加 https://bugs.ruby-lang.org/issues/9647 * Author: Yui NARUSE * Status: Assigned * Priority: Normal * Assignee: Yukihiro Matsumoto * Category: core * Target version: ---------------------------------------- File::Stat#birthtimeを追加しませんか。 以下の様なシステムの stat(2) には st_birthtimespec があり、 (ctime = change time ではなく) ファイルを作成した日時を得ることができます。 http://netbsd.gw.com/cgi-bin/man-cgi?stat+2+NetBSD-current http://www.freebsd.org/cgi/man.cgi?query=stat&sektion=2&apropos=0&manpath=FreeBSD+10.0-RELEASE https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/stat.2.html また、Windowsはbirthtimeがあるがctimeがないという環境ですので、birthtimeはctimeを返します。 http://msdn.microsoft.com/ja-jp/library/ms350241(v=vs.71).aspx 今回のパッチではLinuxやOpenBSDなど、struct statにbirthtimeがない環境では、 Windows同様ctimeを返すようにしています。 (が、意味が違うからWindows以外ではNotImpErrorの方がいいかも) https://github.com/nurse/ruby/compare/ruby:trunk...birthtime -- http://bugs.ruby-lang.org/