APIdock / Ruby
/
method

absolute_path

ruby latest stable - Class: File
absolute_path(*args)
public

Converts a pathname to an absolute pathname. Relative paths are referenced from the current working directory of the process unless dir_string is given, in which case it will be used as the starting point. If the given pathname starts with a "~" it is NOT expanded, it is treated as a normal directory name.

File .absolute_path ("~oracle/bin") #=> "<relative_path>/~oracle/bin"
VALUE
rb_file_s_absolute_path(int argc, const VALUE *argv)
{
 rb_check_arity(argc, 1, 2);
 return rb_file_absolute_path(argv[0], argc > 1 ? argv[1] : Qnil);
}

AltStyle によって変換されたページ (->オリジナル) /