るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

IO#reopen(path) -> self (6270.0)

path で指定されたファイルにストリームを繋ぎ換えます。

...
path
で指定されたファイルにストリームを繋ぎ換えます。

第二引数を省略したとき self のモードをそのまま引き継ぎます。
IO
#pos, IO#lineno などはリセットされます。

@
param path パスを表す文字列を指定します。

@
param mode パ...
...文字列で指定します。

@
raise Errno::EXXX 失敗した場合に発生します。

//emlist[例][ruby]{
IO
.write("testfile", "This is line one\nThis is line two\n")
f1 = File.new("testfile", "a+")
f2 = File.new("testfile")
f1.print("This is line three\n")
f2.readlines # => ["...
...This is line one\n", "This is line two\n"]
f1.close
f2.reopen("testfile", "r") # => #<File:testfile>
f2.readlines # => ["This is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}

@
see Kernel.#open...

IO#reopen(path, mode) -> self (6270.0)

path で指定されたファイルにストリームを繋ぎ換えます。

...
path
で指定されたファイルにストリームを繋ぎ換えます。

第二引数を省略したとき self のモードをそのまま引き継ぎます。
IO
#pos, IO#lineno などはリセットされます。

@
param path パスを表す文字列を指定します。

@
param mode パ...
...文字列で指定します。

@
raise Errno::EXXX 失敗した場合に発生します。

//emlist[例][ruby]{
IO
.write("testfile", "This is line one\nThis is line two\n")
f1 = File.new("testfile", "a+")
f2 = File.new("testfile")
f1.print("This is line three\n")
f2.readlines # => ["...
...This is line one\n", "This is line two\n"]
f1.close
f2.reopen("testfile", "r") # => #<File:testfile>
f2.readlines # => ["This is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}

@
see Kernel.#open...

IO#pathconf(name) -> Integer | nil (6226.0)

fpathconf(3) で取得したファイルの設定変数の値を返します。

...fpathconf(3) で取得したファイルの設定変数の値を返します。

引数 name が制限に関する設定値であり、設定が制限がない状態の場合は nil
を返します。(fpathconf(3) が -1 を返し、errno が設定されていない
場合)

@
param name Etc モジ...
...ュールの PC_ で始まる定数のいずれかを指定します。

//emlist[][ruby]{
r
equire 'etc'
IO
.pipe {|r, w|
p w.pathconf(Etc::PC_PIPE_BUF) # => 4096
}
//}...

IO#reopen(io) -> self (6125.0)

自身を指定された io に繋ぎ換えます。

... io に繋ぎ換えます。

クラスも io に等しくなることに注意してください。
IO
#pos, IO#lineno などは指定された io と等しくなります。

@
param io 自身を繋ぎ換えたい IO オブジェクトを指定します。

@
raise IOError 指定された io が c...