るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io each_line
  5. io readlines

ライブラリ

クラス

検索結果

File.ctime(filename) -> Time (54379.0)

状態が最後に変更された時刻を返します。 状態の変更とは chmod などによるものです。

状態が最後に変更された時刻を返します。
状態の変更とは chmod などによるものです。

@param filename ファイル名を表す文字列か IO オブジェクトを指定します。

@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。

//emlist[例:][ruby]{
IO.write("testfile", "test")
File.ctime("testfile") # => 2017-11-30 22:40:49 +0900
File.chmod(0755, "testfile")
File.ctime("testfile") # => 2...