55件ヒット
[1-55件を表示]
(0.051秒)
種類
- インスタンスメソッド (44)
- 特異メソッド (11)
検索結果
先頭5件
-
Pathname
# ctime -> Time (18153.0) -
File.ctime(self.to_s) を渡したものと同じです。
....ctime(self.to_s) を渡したものと同じです。
//emlist[例][ruby]{
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 File.ctime... -
File
. ctime(filename) -> Time (18137.0) -
状態が最後に変更された時刻を返します。 状態の変更とは chmod などによるものです。
...列か 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")... -
File
# ctime -> Time (18125.0) -
状態が最後に変更された時刻を Time オブジェクトとして返します。状態の変更とは chmod などによるものです。
...るものです。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.ctime } # => 2017-12-21 22:58:1... -
File
# atime -> Time (24.0) -
最終アクセス時刻を Time オブジェクトとして返します。
...トとして返します。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.atime } # => 2017-12-2......1 22:58:17 +0900
//}
@see File#lstat, File#ctime, File#mtime......1 22:58:17 +0900
//}
@see File#lstat, File#ctime, File#mtime, File#birthtime... -
File
# mtime -> Time (24.0) -
最終更新時刻を Time オブジェクトとして返します。
...トとして返します。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.mtime } # => 2017-12-2......1 22:58:17 +0900
//}
@see File#lstat, File#atime, File#ctime......1 22:58:17 +0900
//}
@see File#lstat, File#atime, File#ctime, File#birthtime...