Bug #4077
closedctime error in windows
Description
=begin
In Ruby 1.9.2p0 (2010-08-18) [i386-mingw32] File.ctime does not report the change time of the file. It reports the creation time of the file. mtime reports the change time of the file.
=end
Updated by luislavena (Luis Lavena) about 14 years ago
=begin
Perhaps you file modification and access times are the same?
C:\Users\Luis>ruby -ve "a = '.irbrc'; puts File.mtime(a), File.atime(a), File.ctime(a)"
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
2009-05-16 17:48:54 -0300
2009-09-03 20:08:20 -0300
2009-08-19 19:39:10 -0300
C:\Users\Luis>ruby -rfileutils -e "FileUtils.touch('.irbrc')"
C:\Users\Luis>ruby -ve "a = '.irbrc'; puts File.mtime(a), File.atime(a), File.ctime(a)"
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
2010-11-20 15:55:43 -0300
2010-11-20 15:55:43 -0300
2009-08-19 19:39:10 -0300
=end
Updated by naruse (Yui NARUSE) about 14 years ago
=begin
You correctly know, ctime is "change time" on Unix (inode data modification time).
But ctime of NTFS is "creation time" (a.k.a. s birth time).
Yeah, this is documentation bug, so I fix it.
=end
Updated by naruse (Yui NARUSE) about 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r29844.
Terry, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end