instance method Pathname#ctime

ctime -> Time[permalink][rdoc]

File.ctime(self.to_s) を渡したものと同じです。



require 'pathname'

IO.write("testfile", "test")
pathname = Pathname("testfile")
pathname.ctime # => 2019-01-14 00:39:51 +0900
sleep 1
pathname.chmod(0755)
pathname.ctime # => 2019-01-14 00:39:52 +0900

[SEE_ALSO] File.ctime