dir.pos → integer dir.tell → integer
Returns the current position in dir. See also Dir#seek.
d = Dir.new("testdir") d.tell #=> 0 d.read #=> "." d.tell #=> 12
Source Code
/* * call-seq: * dir.pos => integer * dir.tell => integer * * Returns the current position in <em>dir</em>. See also * <code>Dir#seek</code>. * * d = Dir.new("testdir") * d.tell #=> 0 * d.read #=> "." * d.tell #=> 12 */ static VALUE dir_tell(dir) VALUE dir; { #ifdef HAVE_TELLDIR struct dir_data *dirp; long pos; GetDIR(dir, dirp); pos = telldir(dirp->dir); return rb_int2inum(pos); #else rb_notimplement(); #endif }
<code/>and<pre/>for code samples.