るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io readlines
  4. io each_line
  5. io each

ライブラリ

クラス

検索結果

IO.binread(path, length = nil, offset = 0) -> String | nil (39197.0)

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

...例][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...

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

NEWS for Ruby 2.6.0 (54.0)

NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...れるときに、
例外の Exception#cause も表示されるようになりました。 8257

* フリップフロップが非推奨になりました。 5400

=== 組み込みクラスの更新

* Array
* 新規メソッド
* Array#union と Array#difference 14097
* 変更...
...nding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE__ と __LINE__ の二要素配列として返します。
従来でも eval("[__FILE__, __LINE__]", binding) とすることでこれらの情報は得...
...渡すのは非推奨になる予定で、
今は警告が出ます。 14643

* File
* File.read, File.binread, File.write, File.binwrite,
File.foreach, File.readlines はパスがパイプ文字 '|' で始まっていても
外部コマンドを実行しなくなりました...