るりまサーチ

最速Rubyリファレンスマニュアル検索!
96件ヒット [1-96件を表示] (0.113秒)

別のキーワード

  1. _builtin to_c
  2. etc sc_2_c_dev
  3. etc sc_2_c_bind
  4. tracer display_c_call
  5. tracer display_c_call=

ライブラリ

クラス

キーワード

検索結果

CSV#tell -> Integer (18124.0)

IO#pos, IO#tell に委譲します。

...IO#pos, IO#tell に委譲します。


@see IO#pos, IO#tell...

ARGF.class#tell -> Integer (18108.0)

ARGFが現在開いているファイルのファイルポインタの現在の位置をバイト単位 の整数で返します。

...ARGFが現在開いているファイルのファイルポインタの現在の位置をバイト単位
の整数で返します。

ARGF.pos # => 0
ARGF.gets # => "This is line one\n"
ARGF.pos # => 17

@see IO#pos, IO#tell, ARGF.class#pos=...

Zlib::GzipReader#tell -> Integer (15120.0)

現在までに展開したデータの長さの合計を返します。 ファイルポインタの位置ではないことに注意して下さい。

...に注意して下さい。

require 'zlib'

Zlib::GzipWriter.open('hoge.gz') { |gz|
gz.puts 'hoge'
}

Zlib::GzipReader.open('hoge.gz'){|gz|
while c = gz.getc
printf "%c, %d\n", c, gz.pos
end
}
# 実行例
#=> h, 1
#=> o, 2
#=> g, 3
#=> e, 4
#=>
#=> , 5...

CSV#pos -> Integer (3024.0)

IO#pos, IO#tell に委譲します。

...IO#pos, IO#tell に委譲します。


@see IO#pos, IO#tell...

ARGF.class#pos -> Integer (3008.0)

ARGFが現在開いているファイルのファイルポインタの現在の位置をバイト単位 の整数で返します。

...ARGFが現在開いているファイルのファイルポインタの現在の位置をバイト単位
の整数で返します。

ARGF.pos # => 0
ARGF.gets # => "This is line one\n"
ARGF.pos # => 17

@see IO#pos, IO#tell, ARGF.class#pos=...

絞り込み条件を変える

Dir#pos=(pos) (29.0)

ディレクトリストリームの読み込み位置を pos に移動させます。 pos は Dir#tell で与えられた値でなければなりま せん。

...r#tell で与えられた値でなければなりま
せん。

@param pos 変更したい位置を整数で与えます。

@raise IOError 既に自身が close している場合に発生します。

//emlist[例][ruby]{
Dir.open("testdir") do |d|
d.read # => "."
i = d.tell...
...# => 12
d.read # => ".."
d.seek(i) # => #<Dir:0x401b3c40>
d.read # => ".."
end
//}...

Dir#seek(pos) -> self (29.0)

ディレクトリストリームの読み込み位置を pos に移動させます。 pos は Dir#tell で与えられた値でなければなりま せん。

...r#tell で与えられた値でなければなりま
せん。

@param pos 変更したい位置を整数で与えます。

@raise IOError 既に自身が close している場合に発生します。

//emlist[例][ruby]{
Dir.open("testdir") do |d|
d.read # => "."
i = d.tell...
...# => 12
d.read # => ".."
d.seek(i) # => #<Dir:0x401b3c40>
d.read # => ".."
end
//}...

Zlib::GzipReader#pos -> Integer (20.0)

現在までに展開したデータの長さの合計を返します。 ファイルポインタの位置ではないことに注意して下さい。

...に注意して下さい。

require 'zlib'

Zlib::GzipWriter.open('hoge.gz') { |gz|
gz.puts 'hoge'
}

Zlib::GzipReader.open('hoge.gz'){|gz|
while c = gz.getc
printf "%c, %d\n", c, gz.pos
end
}
# 実行例
#=> h, 1
#=> o, 2
#=> g, 3
#=> e, 4
#=>
#=> , 5...