66件ヒット
[1-66件を表示]
(0.110秒)
別のキーワード
検索結果
先頭5件
-
IO
# reopen(io) -> self (39267.0) -
自身を指定された io に繋ぎ換えます。
...た io に繋ぎ換えます。
クラスも io に等しくなることに注意してください。
IO#pos, IO#lineno などは指定された io と等しくなります。
@param io 自身を繋ぎ換えたい IO オブジェクトを指定します。
@raise IOError 指定された io が c... -
IO
# reopen(path) -> self (39137.0) -
path で指定されたファイルにストリームを繋ぎ換えます。
...ぎます。
IO#pos, IO#lineno などはリセットされます。
@param path パスを表す文字列を指定します。
@param mode パスを開く際のモードを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("test......= 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.c... -
IO
# reopen(path , mode) -> self (39137.0) -
path で指定されたファイルにストリームを繋ぎ換えます。
...ぎます。
IO#pos, IO#lineno などはリセットされます。
@param path パスを表す文字列を指定します。
@param mode パスを開く際のモードを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("test......= 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.c... -
StringIO
# reopen(sio) -> StringIO (21310.0) -
自身が表す文字列が指定された StringIO と同じものになります。
...文字列が指定された StringIO と同じものになります。
@param sio 自身が表したい StringIO を指定します。
//emlist[例][ruby]{
require 'stringio'
sio = StringIO.new("hoge", 'r+')
sio2 = StringIO.new("foo", 'r+')
sio.reopen(sio2)
p sio.read #=> "fo... -
StringIO
# reopen(str , mode = & # 39;r+& # 39;) -> StringIO (21210.0) -
自身が表す文字列が指定された文字列 str になります。
...クを与えた場合は生成した StringIO オブジェクトを引数としてブロックを評価します。
@param str 自身が表したい文字列を指定します。
この文字列はバッファとして使われます。StringIO#write などによって、
str......を指定します。
@raise Errno::EACCES str がフリーズされていて、mode が書き込み可能に設定されている場合に発生します。
//emlist[例][ruby]{
require 'stringio'
sio = StringIO.new("hoge", 'r+')
sio.reopen('foo')
p sio.read #=> "foo"
//}... -
CSV
# reopen(io) -> self (18247.0) -
IO#reopen に委譲します。
...
IO#reopen に委譲します。
@see IO#reopen...