instance method Dir#pos

pos -> Integer[permalink][rdoc][edit]
tell -> Integer

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

[EXCEPTION] IOError:
既に自身が close している場合に発生します。


Dir.open("/tmp") {|d|
  d.each {|f|
    p d.pos
  }
}