るりまサーチ (Ruby 3.3)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.052秒)
トップページ > クエリ:-[x] > クエリ:Raise[x] > バージョン:3.3[x] > クエリ:raise[x] > クエリ:tell[x]

別のキーワード

  1. _builtin raise
  2. kernel raise
  3. fiber raise
  4. thread raise
  5. e2mmap raise

ライブラリ

クラス

キーワード

検索結果

Dir#tell -> Integer (45640.0)

ディレクトリストリームの現在の位置を整数で返します。

ディレクトリストリームの現在の位置を整数で返します。

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

//emlist[例][ruby]{
Dir.open("/tmp") {|d|
d.each {|f|
p d.pos
}
}
//}

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

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

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

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

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

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

//emlist[例][ruby]{
Dir.open("testdir") do |d|
d.read # => "."
i = d.tell # => 12
d.read # => ".."
d.s...

Dir#pos -> Integer (340.0)

ディレクトリストリームの現在の位置を整数で返します。

ディレクトリストリームの現在の位置を整数で返します。

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

//emlist[例][ruby]{
Dir.open("/tmp") {|d|
d.each {|f|
p d.pos
}
}
//}

IO#pos -> Integer (340.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
//}

絞り込み条件を変える