291件ヒット
[201-291件を表示]
(0.016秒)
ライブラリ
- ビルトイン (127)
- fileutils (22)
-
net
/ ftp (11) - pathname (22)
-
rubygems
/ package / tar _ header (11) -
rubygems
/ remote _ fetcher (11) - shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) -
webrick
/ httpservlet / filehandler (11) - zlib (22)
クラス
- File (72)
-
File
:: Stat (22) -
Gem
:: Package :: TarHeader (11) -
Gem
:: RemoteFetcher (11) -
Net
:: FTP (11) - Pathname (22)
- Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - Time (22)
-
WEBrick
:: HTTPServlet :: DefaultFileHandler (11) -
Zlib
:: GzipFile (11) -
Zlib
:: GzipWriter (11)
モジュール
- FileUtils (11)
キーワード
- FileUtils (11)
-
NEWS for Ruby 2
. 5 . 0 (7) - Time (11)
- atime (11)
- birthtime (21)
- ctime (11)
-
fetch
_ path (11) - gmtime (11)
- lutime (7)
- mtime= (11)
-
not
_ modified? (11) - touch (11)
- tsort (11)
- utc (11)
- utime (40)
検索結果
先頭5件
-
File
# ctime -> Time (6223.0) -
状態が最後に変更された時刻を Time オブジェクトとして返します。状態の変更とは chmod などによるものです。
...状態が最後に変更された時刻を 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 +0900
//}
@see File#lstat, File#atime, File#mtime......発生します。
//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 # birthtime -> Time (6207.0) -
作成された時刻を返します。
...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-24 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
//}... -
Time (6078.0)
-
時刻を表すクラスです。
...時刻を表すクラスです。
Time.now は現在の時刻を返します。
File.mtime などが返すファイルのタイムスタンプは Time
オブジェクトです。
Time オブジェクトは時刻を起算時からの経過秒数で保持しています。
起算時は協定世界......定するかどうかはシステムに
よります。
Time オブジェクトが格納可能な時刻の範囲は環境によって異なっていましたが、
Ruby 1.9.2 からは OS の制限の影響を受けません。
また、Time オブジェクトは協定世界時と地方時のど......ます。
//emlist[][ruby]{
p Marshal.load(Marshal.dump(Time.now.gmtime)).zone
# => "UTC"
//}
time ライブラリによって、Time.parse, Time.rfc2822, Time.httpdate, Time.iso8601 等が拡張されます。
Ruby 1.9.2 以降の Time クラスのデザインの詳細は
https://staff.aist.go.j... -
Gem
:: RemoteFetcher # fetch _ path(uri , mtime = nil , head = false) -> String | Hash (207.0) -
与えられた URI からダウンロードしたデータを文字列として返します。
...ータを文字列として返します。
ヘッダ情報のみ取得した場合はハッシュを返します。
@param uri データ取得先の URI を指定します。
@param mtime 更新時刻を指定します。
@param head 真を指定するとヘッダ情報のみ取得します。... -
WEBrick
:: HTTPServlet :: DefaultFileHandler # not _ modified?(request , response , mtime , etag) -> bool (207.0) -
自身に関連付けられたファイルが更新されていなければ、真を返します。 そうでない場合は、偽を返します。
...TPRequest オブジェクトです。
@param response クライアントへのレスポンスを表す WEBrick::HTTPResponse オブジェクトです。
@param mtime 自身に関連付けられたファイルの最終修正時刻を指定します。
@param etag ETag の値を指定します。... -
tsort (72.0)
-
tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
...inputs_time = inputs.map {|f| File.mtime f}.max
begin
outputs_time = outputs.map {|f| File.mtime f}.min
rescue Errno::ENOENT
outputs_time = nil
end
if outputs_time == nil ||
inputs_time != nil && outputs_time <= inputs_time......sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i
block.call
end
end
}
end
def tsort_each_child(node, &block)
@dep[node].each(&block)
end
include TSort
end
def command(arg)
print arg, "\n"
system arg
end
m = Make.new
m.rule(%w[t1]) { c... -
FileUtils
. # touch(list , options = {}) -> () (34.0) -
list で指定されたファイルの最終変更時刻 (mtime) と アクセス時刻 (atime) を変更します。
...list で指定されたファイルの最終変更時刻 (mtime) と
アクセス時刻 (atime) を変更します。
list で指定されたファイルが存在しない場合は空のファイルを作成します。
@param list 対象のファイル。一つの場合は文字列も指定可......場合は配列で指定します。
@param options :mtime, :nocreate, :noop, :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.touch('timestamp')
FileUtils.touch('timestamp', mtime: Time.now)
FileUtils.touch(Dir.glob('*.c'))
//}... -
NEWS for Ruby 2
. 5 . 0 (30.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...するようになりました
13941
* File.rename GVL を解放するようになりました 13951
* File::Stat#atime, File::Stat#mtime, File::Stat#ctime
Windows 8 以降でタイムスタンプの分数表現をサポートしました 13726
* File::Stat#ino, File.identica......File.truncate, File#truncate, File.chmod, File.lchmod, File.chown,
File.lchown, File.unlink, File.utime, File.lstat はGVLを解放するようになりました
* File.lutime を追加 4052
* Hash
* Hash#transform_keys を追加 13583
* Hash#transform_keys! を追加 1358......りました。
coerceがnilを返す場合、変換は不可能です。7688
* Process
* getrusage(2) が存在する場合 Process.#times の精度を改良しました 11952
* Process.last_status を追加。$? と同じです 14043
* Range
* Range.new no longer hides exce... -
FileUtils (12.0)
-
基本的なファイル操作を集めたモジュールです。
...先を削除します。
: :secure
真を指定するとファイルの削除に FileUtils.#remove_entry_secure を使用します。
: :mtime
時刻を Time か、起算時からの経過秒数を数値で指定します。
: :parents
真を指定すると指定したディレクトリの親...