owned?(p1)
public
Returns true if the named file exists and the effective used id of the
calling process is the owner of the file.
file_name can be an IO object.
Show source
static VALUE
rb_file_owned_p(VALUE obj, VALUE fname)
{
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
if (st.st_uid == geteuid()) return Qtrue;
return Qfalse;
}