public Method

Dir.path

dir.path  string or nil

Returns the path parameter passed to dir’s constructor.

d = Dir.new("..")
d.path   #=> ".."

Source Code

/*
*  call-seq:
*     dir.path => string or nil
*
*  Returns the path parameter passed to <em>dir</em>'s constructor.
*
*     d = Dir.new("..")
*     d.path   #=> ".."
*/
static VALUE
dir_path(dir)
   VALUE dir;
{
   struct dir_data *dirp;

   GetDIR(dir, dirp);
   if (!dirp->path) return Qnil;
   return rb_str_new2(dirp->path);
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.