るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.034秒)
トップページ > クラス:IO[x] > バージョン:2.1.0[x] > クエリ:IO[x] > クエリ:gets[x] > クエリ:pos[x]

別のキーワード

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

ライブラリ

キーワード

検索結果

IO#pos -> Integer (117379.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...

IO#pos=(n) (81475.0)

ファイルポインタを指定位置に移動します。 IO#seek(n, IO::SEEK_SET) と同じです。

...ンタを指定位置に移動します。
IO
#seek(n, IO::SEEK_SET) と同じです。

@param n 先頭からのオフセットを整数で指定します。

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

//emlist[例][ruby]{
IO
.write("testfile", "This is line one\nThis is...

IO#tell -> Integer (72079.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...