Sha256: fa87d9d3ed66313307c3574a721b7633af3c58384e0ff6f5ee55f39172e5ed94

Contents?: true

Size: 1.87 KB

Versions: 16

Compression:

Stored size: 1.87 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:
readlink:@docstringIC:YARD::Docstring"ÆReturns the name of the file referenced by the given link.
Not available on all platforms.

   File.symlink("testfile", "link2test")   #=> 0
   File.readlink("link2test")              #=> "testfile"
:@objectu:YARD::StubProxyFile.readlink:
@summary0:	@all"æReturns the name of the file referenced by the given link.
Not available on all platforms.

   File.symlink("testfile", "link2test")   #=> 0
   File.readlink("link2test")              #=> "testfile"


@overload readlink(link_name):@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;File.readlink;;;IC;	"
;
u;File.readlink;0;
";[;[:@types0:@parameters[[:link_name0:
@text0:@signature"readlink(link_name):@tag_name"
overload:@current_file_has_commentsF:@scope:
class;[:@docstring_extra0:@files[["file.c0:@namespaceu;	File:
@path"File.readlink;[:@visibility:public:@source"¦/*
 *  call-seq:
 *     File.readlink(link_name) -> file_name
 *  
 *  Returns the name of the file referenced by the given link.
 *  Not available on all platforms.
 *     
 *     File.symlink("testfile", "link2test")   #=> 0
 *     File.readlink("link2test")              #=> "testfile"
 */

static VALUE
rb_file_s_readlink(klass, path)
    VALUE klass, path;
{
#ifdef HAVE_READLINK
    char *buf;
    int size = 100;
    int rv;
    VALUE v;

    SafeStringValue(path);
    buf = xmalloc(size);
    while ((rv = readlink(RSTRING(path)->ptr, buf, size)) == size
#ifdef _AIX
        || (rv < 0 && errno == ERANGE) /* quirky behavior of GPFS */
#endif
    ) {
    size *= 2;
    buf = xrealloc(buf, size);
    }
    if (rv < 0) {
    free(buf);
    rb_sys_fail(RSTRING(path)->ptr);
    }
    v = rb_tainted_str_new(buf, rv);
    free(buf);

    return v;
#else
    rb_notimplement();
    return Qnil;        /* not reached */
#endif
}:@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/readlink_c.dat
pry-doc-0.5.0 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.4.6 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.4.5 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/File/readlink_c.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/File/readlink_c.dat