種類
- インスタンスメソッド (103)
- 特異メソッド (22)
- クラス (11)
- 文書 (7)
ライブラリ
- ビルトイン (98)
-
net
/ ftp (9) - pathname (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6)
クラス
- File (54)
-
File
:: Stat (33) -
Net
:: FTP :: MLSxEntry (9) - Pathname (11)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
検索結果
先頭5件
-
File
. ctime(filename) -> Time (27231.0) -
状態が最後に変更された時刻を返します。 状態の変更とは chmod などによるものです。
...aram filename ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.ctime("testfile") # => 2017-11-30 22:40:49 +0900
File.ch......mod(0755, "testfile")
File.ctime("testfile") # => 2017-11-30 22:42:12 +0900
//}... -
File
# ctime -> Time (27137.0) -
状態が最後に変更された時刻を Time オブジェクトとして返します。状態の変更とは chmod などによるものです。
...れている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.ctime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#mtime......に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.ctime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#mtime, File#birthtime... -
File
:: Stat # ctime -> Time (21113.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... -
Shell
# ctime(filename) -> Time (18229.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime... -
Shell
:: CommandProcessor # ctime(filename) -> Time (18229.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime... -
Shell
:: Filter # ctime(filename) -> Time (18229.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime... -
Pathname
# ctime -> Time (18157.0) -
File.ctime(self.to_s) を渡したものと同じです。
...File.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.ct... -
File
# atime -> Time (9036.0) -
最終アクセス時刻を Time オブジェクトとして返します。
...に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.atime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#ctime, File#mtime, File#birthtime... -
File
# birthtime -> Time (9036.0) -
作成された時刻を Time オブジェクトとして返します。
...::EXXX ファイルの時刻の取得に失敗した場合に発生します。
@raise NotImplementedError Windows のような birthtime のない環境で発生します。
File.new("testfile").birthtime #=> Wed Apr 09 08:53:14 CDT 2003
@see File#lstat, File#atime, File#ctime, File#mtime... -
File
# mtime -> Time (9036.0) -
最終更新時刻を Time オブジェクトとして返します。
...に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.mtime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#ctime, File#birthtime... -
File
# atime -> Time (9030.0) -
最終アクセス時刻を Time オブジェクトとして返します。
...れている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.atime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#ctime, File#mtime... -
File
# mtime -> Time (9030.0) -
最終更新時刻を Time オブジェクトとして返します。
...ている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.mtime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#ctime... -
File
:: Stat . new(path) -> File :: Stat (3151.0) -
path に関する File::Stat オブジェクトを生成して返します。 File.stat と同じです。
...る File::Stat オブジェクトを生成して返します。
File.stat と同じです。
@param path ファイルのパスを指定します。
@raise Errno::ENOENT pathに該当するファイルが存在しない場合発生します。
//emlist[][ruby]{
p $:[0]
#=> 例
# "C:/Program Files/......ruby-1.8/lib/ruby/site_ruby/1.8"
p File::Stat.new($:[0])
#=> 例
#<File::Stat dev=0x2, ino=0, mode=040755, nlink=1, uid=0, gid=0, rdev=0x2, size=0, blksize=nil, blocks=nil, atime=Sun Sep 02 14:15:20 +0900 2007, mtime=Tue Apr 24 23:03:44 +0900 2007, ctime=Tue Apr 24 23:03:37 +0900 2007>
//}...