別のキーワード
ライブラリ
- ビルトイン (451)
キーワード
- binmode (11)
- binmode? (11)
- closed? (11)
- each (44)
-
each
_ byte (22) -
each
_ char (22) -
each
_ line (44) - eof (11)
- eof? (11)
-
external
_ encoding (11) - file (11)
- gets (33)
-
internal
_ encoding (11) - pos (11)
- read (11)
-
read
_ nonblock (11) - readlines (33)
- readpartial (11)
- seek (11)
-
set
_ encoding (33) - tell (11)
-
to
_ a (33) -
to
_ io (11) -
to
_ write _ io (11) - write (11)
検索結果
先頭5件
-
ARGF
. class # to _ io -> IO (6343.0) -
ARGFが現在開いているファイルのFile、またはIOオブジェクトを 返します。
...ARGFが現在開いているファイルのFile、またはIOオブジェクトを
返します。
ARGF.to_io # => #<File:glark.txt>
ARGF.to_io # => #<IO:<STDIN>>
@see ARGF.class#file, ARGF.class#to_write_io... -
ARGF
. class # to _ write _ io -> IO (6325.0) -
処理対象のファイルへの書き出し用 IO オブジェクトを返します。
...処理対象のファイルへの書き出し用 IO オブジェクトを返します。
c:ARGF#inplace時以外は読み込み用の IO オブジェクトを返します。
このため ARGF.class#write などの書き出し用メソッドを呼ぶと IOError が発生します。... -
ARGF
. class # file -> IO (218.0) -
現在開いている処理対象の File オブジェクト(または IO オブジェ クト)を返します。
...現在開いている処理対象の File オブジェクト(または IO オブジェ
クト)を返します。
$ echo "foo" > foo
$ echo "bar" > bar
$ ruby argf.rb foo bar
ARGF.file # => #<File:foo>
ARGF.read(5) # => "foo\nb"
ARGF.file # => #<File:bar>
ARGFが現在開... -
ARGF
. class # read _ nonblock(maxlen , outbuf = nil , exception: true) -> String | Symbol | nil (217.0) -
処理中のファイルからノンブロッキングモードで最大 maxlen バイト読み込みます。 詳しくは IO#read_nonblock を参照してください。
...理中のファイルからノンブロッキングモードで最大 maxlen バイト読み込みます。
詳しくは IO#read_nonblock を参照してください。
ARGF.class#read などとは違って複数ファイルを同時に読み込むことはありません。
@param maxlen 読み......限を整数で指定します。
@param outbuf 読み込んだデータを格納する String オブジェクトを指定します。
@param exception 読み込み時に Errno::EAGAIN、
Errno::EWOULDBLOCK が発生する代わりに
:wait_readable を返すかど......うかを指定します。また、false
を指定した場合は既に EOF に達していれば
EOFError の代わりに nil を返します。
@see ARGF.class#readpartial... -
ARGF
. class # seek(offset , whence = IO :: SEEK _ SET) -> 0 (214.0) -
ARGFが現在開いているファイルのファイルポインタを whence の位置から offset だけ移動させます。 offset 位置への移動が成功すれば 0 を返します。
...イルポインタを whence の位置から
offset だけ移動させます。 offset 位置への移動が成功すれば 0 を返します。
@param offset ファイルポインタを移動させるオフセットを整数で指定します。
@param whence IO#seek を参照。
@see IO#seek... -
ARGF
. class # set _ encoding(enc _ str , options = {}) -> self (207.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
...介して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで......ます。
@param int_enc 内部エンコーディングを表す文字列か
Encoding オブジェクトを指定します。
@param options エンコーディング変換のオプション。
String#encode と同じものが指定できます。
@see String#encode... -
ARGF
. class # set _ encoding(ext _ enc , int _ enc , options = {}) -> self (207.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
...介して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで......ます。
@param int_enc 内部エンコーディングを表す文字列か
Encoding オブジェクトを指定します。
@param options エンコーディング変換のオプション。
String#encode と同じものが指定できます。
@see String#encode... -
ARGF
. class # binmode -> self (137.0) -
self をバイナリモードにします。一度バイナリモードになった後は非バイナリ モードに戻る事はできません。
...を停止する
* 内容を ASCII-8BIT として扱う
例:
# test1.png - 164B
# test2.png - 128B
# test1.png + test2.png = 292B
# $ ruby test.rb test1.png test2.png
ARGF.binmode
ARGF.read.size # => 292
例:
# test1.png - 164B
# test2.png - 128B
# test1.png + test2.png = 292B......# $ ruby test.rb test1.png test2.png
ARGF.read.size # => 290
@see IO#binmode, ARGF.class#binmode?... -
ARGF
. class # internal _ encoding -> Encoding | nil (137.0) -
ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...external を返します。
ARGF.class#set_encoding で設定します。
例:
# $ ruby -Eutf-8 test.rb
# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('utf-8','ascii')
ARGF.internal_encoding # => #<Encoding:US-ASCII>
例:
ARGF.binmode......ARGF.internal_encoding # => nil
@see IO, ARGF.class#external_encoding... -
ARGF
. class # readpartial(maxlen , outbuf = nil) -> String (123.0) -
IO#readpartialを参照。ARGF.class#read などとは違って複数ファ イルを同時に読み込むことはありません。
...
IO#readpartialを参照。ARGF.class#read などとは違って複数ファ
イルを同時に読み込むことはありません。
@param maxlen 読み込む長さの上限を整数で指定します。
@param outbuf 読み込んだデータを格納する String オブジェクトを指定し......ます。
@see IO#readpartial, ARGF.class#read_nonblock...