path()
public
Returns the path parameter passed to
dir’s constructor.
d = Dir.new("..")
d.path
Show source
/*
* 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;
Data_Get_Struct(dir, struct dir_data, dirp);
if (!dirp->path) return Qnil;
return rb_str_new2(dirp->path);
}