55件ヒット
[1-55件を表示]
(0.093秒)
検索結果
先頭5件
-
Pathname
# binread(*args) -> String | nil (30441.0) -
IO.binread(self.to_s, *args)と同じです。
...IO.binread(self.to_s, *args)と同じです。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("testfile")
pathname.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname.binread(20) # => "This is line one\nThi"
pathname.binread(2......0, 10) # => "ne one\nThis is line "
//}
@see IO.binread... -
IO
. binread(path , length = nil , offset = 0) -> String | nil (30425.0) -
path で指定したファイルを open し、offset の所まで seek し、 length バイト読み込みます。
...SCII-8BIT" です。
//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...\n")
IO.binread("testfile") # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
IO.binread("testfile", 20) # => "This is line......one\nThi"
IO.binread("testfile", 20, 10) # => "ne one\nThis is line "
//}
@see IO.read... -
IO
. read(path , length = nil , **opt) -> String | nil (21345.0) -
path で指定されたファイルを offset 位置から length バイト分読み込んで返します。
...ト分読み込んで返します。
既に EOF に達している場合は nil を返します。ただし、length に nil か 0 が指定されている場合は、空文字列 "" を返します。例えば、IO.read(空ファイル) は "" を返します。
引数 length が指定された......。nil であるか省略した場合には、EOF まで読み込みます。
@param offset 読み込みを始めるオフセットを整数で指定します。
@param opt ファイル path を open する時に使われるオプションをキーワード引数で指定します。
@raise Errno......gs
IO.open に渡される引数を配列で指定します。
これらの他、 :external_encoding など
IO.open のオプション引数が指定できます。
@see IO.binread
例:
IO.read(empty_file) #=> ""
IO.read(empty_file, 1) #=> nil
IO.read(one_byte_fil... -
IO
. read(path , length = nil , offset = 0 , **opt) -> String | nil (21345.0) -
path で指定されたファイルを offset 位置から length バイト分読み込んで返します。
...ト分読み込んで返します。
既に EOF に達している場合は nil を返します。ただし、length に nil か 0 が指定されている場合は、空文字列 "" を返します。例えば、IO.read(空ファイル) は "" を返します。
引数 length が指定された......。nil であるか省略した場合には、EOF まで読み込みます。
@param offset 読み込みを始めるオフセットを整数で指定します。
@param opt ファイル path を open する時に使われるオプションをキーワード引数で指定します。
@raise Errno......gs
IO.open に渡される引数を配列で指定します。
これらの他、 :external_encoding など
IO.open のオプション引数が指定できます。
@see IO.binread
例:
IO.read(empty_file) #=> ""
IO.read(empty_file, 1) #=> nil
IO.read(one_byte_fil... -
IO
. read(path , **opt) -> String | nil (21245.0) -
path で指定されたファイルを offset 位置から length バイト分読み込んで返します。
...ト分読み込んで返します。
既に EOF に達している場合は nil を返します。ただし、length に nil か 0 が指定されている場合は、空文字列 "" を返します。例えば、IO.read(空ファイル) は "" を返します。
引数 length が指定された......。nil であるか省略した場合には、EOF まで読み込みます。
@param offset 読み込みを始めるオフセットを整数で指定します。
@param opt ファイル path を open する時に使われるオプションをキーワード引数で指定します。
@raise Errno......gs
IO.open に渡される引数を配列で指定します。
これらの他、 :external_encoding など
IO.open のオプション引数が指定できます。
@see IO.binread
例:
IO.read(empty_file) #=> ""
IO.read(empty_file, 1) #=> nil
IO.read(one_byte_fil...