path()
public
Returns the pathname used to create file as a string. Does not
normalize the name.
File.new("testfile").path
File.new("/tmp/../tmp/xxx", "w").path
Show source
static VALUE
rb_file_path(VALUE obj)
{
rb_io_t *fptr;
fptr = RFILE(rb_io_taint_check(obj))->fptr;
rb_io_check_initialized(fptr);
if (NIL_P(fptr->pathv)) return Qnil;
return rb_obj_taint(rb_str_dup(fptr->pathv));
}