るりまサーチ

最速Rubyリファレンスマニュアル検索!
50件ヒット [1-50件を表示] (0.050秒)

別のキーワード

  1. _builtin raise
  2. kernel raise
  3. fiber raise
  4. thread raise
  5. e2mmap raise

ライブラリ

クラス

キーワード

検索結果

File.utime(atime, mtime, *filename) -> Integer (21307.0)

ファイルの最終アクセス時刻と更新時刻を変更します。 シンボリックリンクに対しては File.lutime と違って、 シンボリックのリンク先を変更します。

...します。

@param mtime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。

@param filename ファイル名を表す文字列を指定します。複数指定できます。

@return 変更したファイルの数を返します。

@raise Errno::EXXX 変更...
....new(2018, 1, 2, 3, 4, 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
...
....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
....

File::Stat.new(path) -> File::Stat (21264.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>
//}...

File#birthtime -> Time (21060.0)

作成された時刻を Time オブジェクトとして返します。

...

@raise IOError 自身が close されている場合に発生します。

@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。

@raise NotImplementedError Windows のような birthtime のない環境で発生します。

File
.new("testfile").birthti...
...me #=> Wed Apr 09 08:53:14 CDT 2003

@see File#lstat, File#atime, File#ctime, File#mtime...

NEWS for Ruby 2.5.0 (6270.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 2.5.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...ました 11286

* File
* File.open :newline オプションを指定するとテキストモードになります 13350
* File#path はFile::Constants::TMPFILE付きで開いたファイルに対して IOError を発生させます
13568
* File.stat, File.exist? など rb_stat()...
...ました
13941
* File.rename GVL を解放するようになりました 13951
* File::Stat#atime, File::Stat#mtime, File::Stat#ctime
Windows 8 以降でタイムスタンプの分数表現をサポートしました 13726
* File::Stat#ino, File.identical?
Windows 8.1...

tsort (42.0)

tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。

...ray === n}
raise
TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}")
end
n = ns.first
if Array === n
outputs, inputs, block = n
inputs_time = inputs.map {|f| File.mtime f}.max
begin
outputs_time = outputs.map {|f| File.mtime f}.min...
...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]) { command 'date > t1' }
m.rule(%w[t2]) { command 'date > t2' }
m.rule(%w[t3]) { command 'date > t3' }
m.rule(%w[t4], %w[t1 t3]) { co...

絞り込み条件を変える