static public Method

File.lchmod(...)

File.lchmod(mode_int, file_name, ...)   integer

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.

Source Code

/*
*  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);
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.