868件ヒット
[801-868件を表示]
(0.041秒)
別のキーワード
種類
- インスタンスメソッド (676)
- 特異メソッド (192)
キーワード
- advise (12)
- autoclose? (12)
- binmode (12)
- binread (12)
- binwrite (12)
- clone (12)
- close (12)
-
close
_ read (12) -
close
_ write (12) - closed? (12)
-
copy
_ stream (24) - dup (12)
- each (72)
-
each
_ byte (24) -
each
_ codepoint (24) -
each
_ line (72) -
external
_ encoding (12) - fcntl (12)
- fdatasync (12)
- fileno (12)
- flush (12)
-
for
_ fd (12) - foreach (24)
-
internal
_ encoding (12) - isatty (12)
- new (12)
- open (24)
- path (3)
- pathconf (12)
- pid (12)
- pos (12)
- pos= (12)
- pread (8)
- print (12)
- putc (12)
- pwrite (8)
- readbyte (12)
- readlines (72)
- reopen (36)
-
set
_ encoding _ by _ bom (6) - stat (12)
- sync (12)
- sysopen (12)
- syswrite (12)
- tell (12)
-
to
_ i (12) -
to
_ path (3) - tty? (12)
- wait (12)
-
wait
_ readable (12) - write (36)
検索結果
先頭5件
-
IO
. copy _ stream(src , dst , copy _ length , src _ offset) -> Integer (13.0) -
指定された src から dst へコピーします。 コピーしたバイト数を返します。
...指定された src から dst へコピーします。
コピーしたバイト数を返します。
コピー元の src が IO オブジェクトの場合は、src のオフセットから
ファイル名の場合はファイルの最初からコピーを開始します。
コピー先の dst......を数値で指定します。
//emlist[例][ruby]{
IO.write("filetest", "abcdefghij")
IO.copy_stream("filetest", "filecopy", 2) # => 2
IO.read("filecopy") # => "ab"
IO.copy_stream("filetest", "filecopy", 3, 4) # => 3
IO.read("filecopy") # =>... -
IO
. readlines(path , limit , opts={}) -> [String] (13.0) -
path で指定されたファイルを全て読み込んで、その各行を要素としてもつ配列を返します。
...、ファイルの読み込みに失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "line1\nline2,\nline3\n")
IO.readlines("testfile") # => ["line1\n", "line2,\n", "line3\n"]
IO.readlines("testfile", ",") # => ["line1\nline2,", "\nline3\n"]
//}... -
IO
. readlines(path , rs = $ / , opts={}) -> [String] (13.0) -
path で指定されたファイルを全て読み込んで、その各行を要素としてもつ配列を返します。
...、ファイルの読み込みに失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "line1\nline2,\nline3\n")
IO.readlines("testfile") # => ["line1\n", "line2,\n", "line3\n"]
IO.readlines("testfile", ",") # => ["line1\nline2,", "\nline3\n"]
//}... -
IO
. readlines(path , rs , limit , opts={}) -> [String] (13.0) -
path で指定されたファイルを全て読み込んで、その各行を要素としてもつ配列を返します。
...、ファイルの読み込みに失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "line1\nline2,\nline3\n")
IO.readlines("testfile") # => ["line1\n", "line2,\n", "line3\n"]
IO.readlines("testfile", ",") # => ["line1\nline2,", "\nline3\n"]
//}... -
IO
. sysopen(path , mode = "r" , perm = 0666) -> Integer (13.0) -
path で指定されるファイルをオープンし、ファイル記述子を返しま す。
...path で指定されるファイルをオープンし、ファイル記述子を返しま
す。
IO.for_fd などで IO オブジェクトにしない限り、このメソッ
ドでオープンしたファイルをクローズする手段はありません。
@param path ファイル名を表す......する場合の
ファイルのパーミッションを整数で指定します。Kernel.#open と同じです。
@raise Errno::EXXX ファイルのオープンに失敗した場合に発生します。
//emlist[例][ruby]{
IO.sysopen("testfile", "w+") # => 3
//}
@see Kernel.#open... -
IO
. write(path , string , **opts) -> Integer (13.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...とができます。
詳しくは IO.open を見てください。
@param path ファイル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
@param opts ファイルを開くときのキーワード引数
//emlist[例][ruby]{
text = "This is line one\nThis is......s line three\nAnd so on...\n"
IO.write("testfile", text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile")......# => "0123456789"
//}
@see IO.binwrite... -
IO
. write(path , string , offset=nil , **opts) -> Integer (13.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...とができます。
詳しくは IO.open を見てください。
@param path ファイル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
@param opts ファイルを開くときのキーワード引数
//emlist[例][ruby]{
text = "This is line one\nThis is......s line three\nAnd so on...\n"
IO.write("testfile", text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile")......# => "0123456789"
//}
@see IO.binwrite... -
IO
# reopen(io) -> self (3.0) -
自身を指定された io に繋ぎ換えます。
...た io に繋ぎ換えます。
クラスも io に等しくなることに注意してください。
IO#pos, IO#lineno などは指定された io と等しくなります。
@param io 自身を繋ぎ換えたい IO オブジェクトを指定します。
@raise IOError 指定された io が c...