るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.040秒)
トップページ > バージョン:2.6.0[x] > クエリ:io[x] > クエリ:open[x] > クエリ:tell[x] > 種類:インスタンスメソッド[x]

別のキーワード

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

ライブラリ

クラス

検索結果

IO#tell -> Integer (72343.0)

ファイルポインタの現在の位置を整数で返します。

ファイルポインタの現在の位置を整数で返します。

@raise IOError 既に close されている場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "This is line one\n")
File.open("testfile") do |f|
f.pos # => 0
f.gets # => "This is line one\n"
f.pos # => 17
end
//}

IO#pos -> Integer (27043.0)

ファイルポインタの現在の位置を整数で返します。

ファイルポインタの現在の位置を整数で返します。

@raise IOError 既に close されている場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "This is line one\n")
File.open("testfile") do |f|
f.pos # => 0
f.gets # => "This is line one\n"
f.pos # => 17
end
//}