291件ヒット
[1-100件を表示]
(0.039秒)
ライブラリ
- ビルトイン (138)
- fileutils (33)
-
net
/ ftp (11) - pathname (22)
- shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) -
webrick
/ httpservlet / filehandler (11) - zlib (22)
クラス
- File (83)
-
File
:: Stat (33) -
Net
:: FTP (11) - Pathname (22)
- Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (11) -
Zlib
:: GzipFile (11) -
Zlib
:: GzipWriter (11)
モジュール
- FileUtils (22)
検索結果
先頭5件
-
File
. mtime(filename) -> Time (39219.0) -
最終更新時刻を返します。
...更新時刻を返します。
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例][ruby]{
File.mtime(__FILE__) # => 2017-12-03 03:16:22 +0900
//}... -
File
# mtime -> Time (39137.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......に発生します。
@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
. utime(atime , mtime , *filename) -> Integer (21289.0) -
ファイルの最終アクセス時刻と更新時刻を変更します。 シンボリックリンクに対しては File.lutime と違って、 シンボリックのリンク先を変更します。
...セス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。
@param filename ファイル名を表す文字列を指定します。複数指定できます。
@return......5)
mtime = Time.new(2018, 2, 3, 4, 5, 6)
File.utime(atime, mtime, "testfile") # => 1
File.atime("testfile") # => 2018-01-02 03:04:05 +0900
File.mtime("testfile") # => 2018-02-03 04:05:06 +0900
//}
//emlist[例: 経過秒数で指定][ruby]{
File.utime(1, 2, "testfile"......) # => 1
File.atime("testfile") # => 1970-01-01 09:00:01 +0900
File.mtime("testfile") # => 1970-01-01 09:00:02 +0900
//}......シンボリックリンクに対しては File.lutime と違って、
シンボリックのリンク先を変更します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時から...... filename ファイル名を表す文字列を指定します。複数指定できます。
@return 変更したファイルの数を返します。
@raise Errno::EXXX 変更に失敗した場合に発生します。
//emlist[例: Time を指定][ruby]{
atime = Time.new(2018, 1, 2, 3, 4, 5)
mtime......5, 6)
File.utime(atime, mtime, "testfile") # => 1
File.atime("testfile") # => 2018-01-02 03:04:05 +0900
File.mtime("testfile") # => 2018-02-03 04:05:06 +0900
//}
//emlist[例: 経過秒数で指定][ruby]{
File.utime(1, 2, "testfile") # => 1
File.atime("testfile")... -
File
. stat(filename) -> File :: Stat (21247.0) -
filename の情報を含む File::Stat オブジェクトを生成し て返します。
...
filename の情報を含む File::Stat オブジェクトを生成し
て返します。
@param filename ファイル名を表す文字列を指定します。
@raise Errno::EXXX 情報の取得に失敗した場合に発生します。
//emlist[例][ruby]{
File.stat("testfile").class # => Fi......le::Stat
File.stat("testfile").mtime # => 2017-12-10 01:13:56 +0900
//}
@see IO#stat, File#lstat... -
File
. lutime(atime , mtime , *filename) -> Integer (21229.0) -
ファイルの最終アクセス時刻と更新時刻を変更します。 シンボリックリンクに対しては File.utime と違って、 シンボリックそのものを変更します。
...。
シンボリックリンクに対しては File.utime と違って、
シンボリックそのものを変更します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時から......の経過秒数を数値で指定します。
@param filename ファイル名を表す文字列を指定します。複数指定できます。
@return 変更したファイルの数を返します。
@raise Errno::EXXX 変更に失敗した場合に発生します。
@see File.utime... -
File
:: Stat # mtime -> Time (21113.0) -
最終更新時刻を返します。
...最終更新時刻を返します。
//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.mtime #=> Wed Sep 05 20:42:18 +0900 2007
//}
@see Time... -
Zlib
:: GzipFile # mtime -> Time (21101.0) -
gzip ファイルのヘッダーに記録されている最終更新時間を返します。
gzip ファイルのヘッダーに記録されている最終更新時間を返します。 -
File
# atime -> Time (21036.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 (21036.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
# ctime -> Time (21036.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, File#birthtime...