/* * call-seq: * file.lchown(owner_int, group_int, file_name,..) => integer * * Equivalent to <code>File::chown</code>, but does not follow symbolic * links (so it will change the owner associated with the link, not the * file referenced by the link). Often not available. Returns number * of files in the argument list. * */ static VALUE rb_file_s_lchown(argc, argv) int argc; VALUE *argv; { VALUE o, g, rest; struct chown_args arg; long n; rb_secure(2); rb_scan_args(argc, argv, "2*", &o, &g, &rest); if (NIL_P(o)) { arg.owner = -1; } else { arg.owner = NUM2INT(o); } if (NIL_P(g)) { arg.group = -1; } else { arg.group = NUM2INT(g); } n = apply2files(lchown_internal, rest, &arg); return LONG2FIX(n); }