るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.057秒)
トップページ > クエリ:-[x] > クエリ:on[x] > クエリ:binread[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

検索結果

Pathname#binread(*args) -> String | nil (18247.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 (18237.0)

path で指定したファイルを open し、offset の所まで seek し、 length バイト読み込みます。

...I-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 on...
...e\nThi"
IO.binread("testfile", 20, 10) # => "ne one\nThis is line "
//}

@see IO.read...