static public Method

File.exists?(p1)

File.exist?(file_name)      true or false
File.exists?(file_name)     true or false    (obsolete)

Return true if the named file exists.

Source Code

/*
* call-seq:
*    File.exist?(file_name)    =>  true or false
*    File.exists?(file_name)   =>  true or false    (obsolete)
*
* Return <code>true</code> if the named file exists.
*/

static VALUE
test_e(obj, fname)
   VALUE obj, fname;
{
   struct stat st;

   if (rb_stat(fname, &st) < 0) return Qfalse;
   return Qtrue;
}
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.