static public Method

File.executable_real?(p1)

File.executable_real?(file_name)    true or false

Returns true if the named file is executable by the real user id of this process.

Source Code

/*
* call-seq:
*    File.executable_real?(file_name)   => true or false
*
* Returns <code>true</code> if the named file is executable by the real
* user id of this process.
*/

static VALUE
test_X(obj, fname)
   VALUE obj, fname;
{
   SafeStringValue(fname);
   if (access(StringValueCStr(fname), X_OK) < 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.