exist?(p1)
public
Return true if the named file exists.
Show source
/*
* 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;
}