83件ヒット
[1-83件を表示]
(0.106秒)
種類
- インスタンスメソッド (54)
- 特異メソッド (22)
- 文書 (7)
ライブラリ
- ビルトイン (76)
クラス
- File (54)
-
File
:: Stat (22)
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) - atime (11)
- birthtime (21)
- mtime (11)
- new (11)
検索結果
先頭5件
-
File
. ctime(filename) -> Time (18243.0) -
状態が最後に変更された時刻を返します。 状態の変更とは chmod などによるものです。
...定します。
@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") # => 2017-11-30 22:42:12 +0900
//... -
File
# ctime -> Time (18231.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:17 +090... -
File
:: Stat # birthtime -> Time (160.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-2......4 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
//}... -
File
# atime -> Time (130.0) -
最終アクセス時刻を Time オブジェクトとして返します。
...します。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.atime } # => 2017-12-21 22:58:17 +090......0
//}
@see File#lstat, File#ctime, File#mtime......0
//}
@see File#lstat, File#ctime, File#mtime, File#birthtime... -
File
# mtime -> Time (130.0) -
最終更新時刻を Time オブジェクトとして返します。
...します。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.mtime } # => 2017-12-21 22:58:17 +090......0
//}
@see File#lstat, File#atime, File#ctime......0
//}
@see File#lstat, File#atime, File#ctime, File#birthtime... -
NEWS for Ruby 2
. 5 . 0 (126.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.4.0 以降の変更
=== 言語仕様の変更
* トップレベルの定数参照を削除......りました
13941
* File.rename GVL を解放するようになりました 13951
* File::Stat#atime, File::Stat#mtime, File::Stat#ctime
Windows 8 以降でタイムスタンプの分数表現をサポートしました 13726
* File::Stat#ino, File.identical?
Windows 8......and raise a "bad value for range" ArgumentError
but instead lets the exception from the #<=> call go through.
7688
* Regexp
* Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05 に更新
* 非包含オペレータ(absence operator)をサポート https://github.com/k-tak... -
File
# birthtime -> Time (124.0) -
作成された時刻を Time オブジェクトとして返します。
...た時刻を Time オブジェクトとして返します。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::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
:: Stat . new(path) -> File :: Stat (118.0) -
path に関する 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 de......v=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>
//}...