static public Method

File.delete(...)

File.delete(file_name, ...)   integer
File.unlink(file_name, ...)   integer

Deletes the named files, returning the number of names passed as arguments. Raises an exception on any error. See also Dir::rmdir.

Source Code

/*
*  call-seq:
*     File.delete(file_name, ...)  => integer
*     File.unlink(file_name, ...)  => integer
*  
*  Deletes the named files, returning the number of names
*  passed as arguments. Raises an exception on any error.
*  See also <code>Dir::rmdir</code>.
*/

static VALUE
rb_file_s_unlink(klass, args)
   VALUE klass, args;
{
   long n;

   rb_secure(2);
   n = apply2files(unlink_internal, args, 0);
   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.