From 1346b84c195cd6587f93dfe7faac199acc8f6936 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 20 Nov 2010 19:38:42 +0000 Subject: [PATCH] NTFS's ctime is creation time! [ruby-core:33269] Note that UFS2, HFS+, ZFS, and ext4 also have birth time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/file.c b/file.c index dc9f830fc7..d5a50b2de5 100644 --- a/file.c +++ b/file.c @@ -713,6 +713,8 @@ rb_stat_mtime(VALUE self) * directory information about the file was changed, not the file * itself). * + * Note that on Windows (NTFS), returns creation time (birth time). + * * File.stat("testfile").ctime #=> Wed Apr 09 08:53:14 CDT 2003 * */ @@ -1869,6 +1871,8 @@ rb_file_mtime(VALUE obj) * directory information about the file was changed, not the file * itself). * + * Note that onn Windows (NTFS), returns creation time (birth time). + * * File.ctime("testfile") #=> Wed Apr 09 08:53:13 CDT 2003 * */ @@ -1892,6 +1896,8 @@ rb_file_s_ctime(VALUE klass, VALUE fname) * Returns the change time for file (that is, the time directory * information about the file was changed, not the file itself). * + * Note that onn Windows (NTFS), returns creation time (birth time). + * * File.new("testfile").ctime #=> Wed Apr 09 08:53:14 CDT 2003 * */