33件ヒット
[1-33件を表示]
(0.026秒)
ライブラリ
- ビルトイン (33)
キーワード
-
close
_ write (11) - closed? (11)
検索結果
-
IO
# close _ read -> nil (18115.0) -
読み込み用の IO を close します。主にパイプや読み書き両用に作成し た IO オブジェクトで使用します。
...読み込み用の IO を close します。主にパイプや読み書き両用に作成し
た IO オブジェクトで使用します。
@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 を 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 (20.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... -
IO
# close _ write -> nil (14.0) -
書き込み用の IO を close します。
... IO を close します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX close に失敗した場合に発生します。
//emlist[例][ruby]{
f = IO.popen("/bin/sh","r+") do |f|
f.close_write
# f.print "nowhere" # => IOEr......ror: not opened for writing
end
//}
@see IO#close, IO#closed?, IO#close_read...... 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...