symlink(p1, p2)
public
Creates a symbolic link called
new_name for the existing file old_name. Raises a
NotImplemented exception on platforms that do not support symbolic links.
File.symlink("testfile", "link2test")
Show source
static VALUE
rb_file_s_symlink(VALUE klass, VALUE from, VALUE to)
{
rb_secure(2);
FilePathValue(from);
FilePathValue(to);
if (symlink(StringValueCStr(from), StringValueCStr(to)) < 0) {
sys_fail2(from, to);
}
return INT2FIX(0);
rb_notimplement();
return Qnil; /* not reached */
}