Sha256: 4e9d27cdb1329672545ed6d7d51859308bacf9486c5f790ce079e4d07271e235

Contents?: true

Size: 1.6 KB

Versions: 16

Compression:

Stored size: 1.6 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:readable?:@docstringIC:YARD::Docstring"Returns <code>true</code> if <i>stat</i> is readable by the
effective user id of this process.

   File.stat("testfile").readable?   #=> true
:@objectu:YARD::StubProxyFile::Stat#readable?:
@summary0:	@all"¸Returns <code>true</code> if <i>stat</i> is readable by the
effective user id of this process.

   File.stat("testfile").readable?   #=> true



@overload readable?
  @return [Boolean]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;File::Stat#readable?;;;IC;	"
;
u;File::Stat#readable?;0;
"@return [Boolean];[;[o:YARD::Tags::Tag
;
0;0:@types["Boolean:
@text":@tag_name"return;0:@parameters[;0:@signature"readable?;"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["file.c0:@namespaceu;File::Stat:
@path"File::Stat#readable?;[:@visibility:public:@source"¨/*
 *  call-seq:
 *     stat.readable?    => true or false
 *  
 *  Returns <code>true</code> if <i>stat</i> is readable by the
 *  effective user id of this process.
 *     
 *     File.stat("testfile").readable?   #=> true
 *     
 */

static VALUE
rb_stat_r(obj)
    VALUE obj;
{
    struct stat *st = get_stat(obj);

#ifdef USE_GETEUID
    if (geteuid() == 0) return Qtrue;
#endif
#ifdef S_IRUSR
    if (rb_stat_owned(obj))
    return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IRGRP
    if (rb_stat_grpowned(obj))
    return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IROTH
    if (!(st->st_mode & S_IROTH)) return Qfalse;
#endif
    return Qtrue;
}:@source_type:c

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
pry-doc-0.5.1 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.5.0 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.4.6 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.4.5 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/File/Stat/readable_3F_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/File/Stat/readable_3F_i.dat