3件ヒット
[1-3件を表示]
(0.028秒)
キーワード
-
close
_ read (1) - closed? (1)
検索結果
-
IO
# close _ write -> nil (81472.0) -
書き込み用の IO を close します。
...の IO を close します。
既に close されていた場合には単に無視されます。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX close に失敗した場合に発生します。
//emlist[例][ruby]{
f = IO.popen......("/bin/sh","r+") do |f|
f.close_write
# f.print "nowhere" # => IOError: not opened for writing
end
//}
@see IO#close, IO#closed?, IO#close_read... -
IO
# close _ read -> nil (27217.0) -
読み込み用の IO を close します。主にパイプや読み書き両用に作成し た IO オブジェクトで使用します。
...読み込み用の IO を close します。主にパイプや読み書き両用に作成し
た IO オブジェクトで使用します。
既に close されていた場合には単に無視されます。
@raise IOError 自身が読み込み用にオープンされていなければ発生し......ます。
@raise Errno::EXXX close に失敗した場合に発生します。
//emlist[例][ruby]{
IO.popen("/bin/sh","r+") do |f|
f.close_read
# f.readlines # => IOError: not opened for reading
end
//}
@see IO#close, IO#closed?, IO#close_write... -
IO
# closed? -> bool (27157.0) -
self が完全に(読み込み用と書き込み用の両方が)クローズされている場合に true を返します。 そうでない場合は false を返します。
...t[例][ruby]{
IO.write("testfile", "test")
f = File.new("testfile")
f.close # => nil
f.closed? # => true
f = IO.popen("/bin/sh","r+")
f.close_write # => nil
f.closed? # => false
f.close_read # => nil
f.closed? # => true
//}
@see IO#close, IO#close_read, IO#close_write...