るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. new openssl::bn
  2. new openssl::asn1::asn1data
  3. new openssl::x509::certificate
  4. new openssl::pkey::ec::group
  5. start net::smtp

ライブラリ

クラス

検索結果

File::Stat#mtime -> Time (117343.0)

最終更新時刻を返します。

最終更新時刻を返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.mtime #=> Wed Sep 05 20:42:18 +0900 2007
//}

@see Time

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

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

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

@raise NotImplementedError Windows のような 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...