lchmod(...)
public
Equivalent to File::chmod, but does not follow symbolic links (so it will
change the permissions associated with the link, not the file referenced by
the link). Often not available.
Show source
/*
* call-seq:
* File.lchmod(mode_int, file_name, ...) => integer
*
* Equivalent to <code>File::chmod</code>, but does not follow symbolic
* links (so it will change the permissions associated with the link,
* not the file referenced by the link). Often not available.
*
*/
static VALUE
rb_file_s_lchmod(argc, argv)
int argc;
VALUE *argv;
{
VALUE vmode;
VALUE rest;
long mode, n;
rb_secure(2);
rb_scan_args(argc, argv, "1*", &vmode, &rest);
mode = NUM2INT(vmode);
n = apply2files(lchmod_internal, rest, (void *)(long)mode);
return LONG2FIX(n);
}