るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.029秒)

別のキーワード

  1. time httpdate
  2. time rfc2822
  3. time iso8601
  4. time strptime
  5. time parse

検索結果

File::Stat#ctime -> Time (24318.0)

最終状態変更時刻を返します。 (状態の変更とは chmod などによるもので、Unix では i-node の変更を意味します)

...最終状態変更時刻を返します。
(状態の変更とは chmod などによるもので、Unix では i-node の変更を意味します)

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.ctime.to_f #=> 1188719843.0
//}


@see Time...

File::Stat#birthtime -> Time (6211.0)

作成された時刻を返します。

...birthtime のない環境で発生します。

//emlist[][ruby]{
File.write("testfile", "foo")
sleep 10
File.write("testfile", "bar")
sleep 10
File.chmod(0644, "testfile")
sleep 10
File.read("testfile")
File.stat("testfile").birthtime #=> 2014-02-24 11:19:17 +0900
File.stat("testfile").mtime...
...#=> 2014-02-24 11:19:27 +0900
File.stat("testfile").ctime #=> 2014-02-24 11:19:37 +0900
File.stat("testfile").atime #=> 2014-02-24 11:19:47 +0900
//}...