るりまサーチ (Ruby 3.3)

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file atime
  4. file mtime
  5. file path

ライブラリ

クラス

検索結果

IO#tell -> Integer (108343.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 (63043.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
//}