writable?(p1)
Returns true if the named file is writable by the effective user and group id of this process. See eaccess(3).
static VALUE rb_file_writable_p(VALUE obj, VALUE fname) { if (rb_eaccess(fname, W_OK) < 0) return Qfalse; return Qtrue; }