種類
- インスタンスメソッド (77)
- 特異メソッド (44)
キーワード
- close (11)
-
close
_ write (11) - closed? (22)
- open (44)
検索結果
先頭5件
-
CSV
# close _ read -> nil (24223.0) -
IO#close_read に委譲します。
...IO#close_read に委譲します。
@see IO#close_read... -
IO
# close _ read -> nil (24207.0) -
読み込み用の IO を close します。主にパイプや読み書き両用に作成し た IO オブジェクトで使用します。
...O を 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... -
StringIO
# close _ read -> nil (24201.0) -
自身に対する読み取りを禁止します。
自身に対する読み取りを禁止します。
@raise IOError 自身がすでに読み取り不可だった場合に発生します。 -
IO
# closed? -> bool (6112.0) -
self が完全に(読み込み用と書き込み用の両方が)クローズされている場合に true を返します。 そうでない場合は false を返します。
...self が完全に(読み込み用と書き込み用の両方が)クローズされている場合に true を返します。
そうでない場合は false を返します。
//emlist[例][ruby]{
IO.write("testfile", "test")
f = File.new("testfile")
f.close # => nil
f.closed? # => tr......ue
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 -> nil (6106.0) -
入出力ポートをクローズします。
...self がパイプでプロセスにつながっていれば、そのプロセスの終
了を待ち合わせます。
@raise Errno::EXXX close に失敗した場合に発生します。
@raise IOError 既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile"......, "test")
f = File.open("testfile")
f.read # => "test"
f.close
# f.read # => IOError (すでに close しているので read できない)
//}
@see IO#closed?, IO#close_read, IO#close_write......self がパイプでプロセスにつながっていれば、そのプロセスの終
了を待ち合わせます。
既に close されていた場合には単に無視されます。
@raise Errno::EXXX close に失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile",......"test")
f = File.open("testfile")
f.read # => "test"
f.close
# f.read # => IOError (すでに close しているので read できない)
//}
@see IO#closed?, IO#close_read, IO#close_write... -
IO
# close _ write -> nil (6106.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 "now......here" # => IOError: 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... -
StringIO
# closed? -> bool (6106.0) -
自身が既に close されていた場合に true を返します。そうでない場合は、false を返します。
...自身が既に close されていた場合に true を返します。そうでない場合は、false を返します。
//emlist[例][ruby]{
require "stringio"
sio = StringIO.open("hoge")
p sio.closed? # => false
sio.close_read
p sio.closed? # => false
sio.close_write
p sio.closed? # => true
/... -
CSV
. open(filename , mode = "rb" , options = Hash . new) -> CSV (106.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...クローズします。
ブロックが与えられなかった場合は CSV オブジェクトを返します。
データが Encoding.default_external と異なる場合は、mode にエンコー
ディングを指定する文字列を埋め込まなければなりません。データをどの......File に委譲します。
* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File......#tell
* IO#to_i
* IO#to_io
* File#truncate
* IO#tty?
@param filename ファイル名を指定します。
@param mode IO.open に指定できるものと同じものを指定できます。
@param options CSV.new のオプションと同じオプションを指定できます。
//emlist... -
CSV
. open(filename , mode = "rb" , options = Hash . new) {|csv| . . . } -> nil (106.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...クローズします。
ブロックが与えられなかった場合は CSV オブジェクトを返します。
データが Encoding.default_external と異なる場合は、mode にエンコー
ディングを指定する文字列を埋め込まなければなりません。データをどの......File に委譲します。
* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File......#tell
* IO#to_i
* IO#to_io
* File#truncate
* IO#tty?
@param filename ファイル名を指定します。
@param mode IO.open に指定できるものと同じものを指定できます。
@param options CSV.new のオプションと同じオプションを指定できます。
//emlist... -
CSV
. open(filename , options = Hash . new) -> CSV (106.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...クローズします。
ブロックが与えられなかった場合は CSV オブジェクトを返します。
データが Encoding.default_external と異なる場合は、mode にエンコー
ディングを指定する文字列を埋め込まなければなりません。データをどの......File に委譲します。
* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File......#tell
* IO#to_i
* IO#to_io
* File#truncate
* IO#tty?
@param filename ファイル名を指定します。
@param mode IO.open に指定できるものと同じものを指定できます。
@param options CSV.new のオプションと同じオプションを指定できます。
//emlist...