Sha256: 8e8a410937430570dea6b14e46b1b045457c5ea3e16f0d7f038a1de8b207f836

Contents?: true

Size: 1.99 KB

Versions: 16

Compression:

Stored size: 1.99 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:	link:@docstringIC:YARD::Docstring"8Creates a new name for an existing file using a hard link. Will not
overwrite <i>new_name</i> if it already exists (raising a subclass
of <code>SystemCallError</code>). Not available on all platforms.

   File.link("testfile", ".testfile")   #=> 0
   IO.readlines(".testfile")[0]         #=> "This is line one\n"
:@objectu:YARD::StubProxyFile.link:
@summary0:	@all"kCreates a new name for an existing file using a hard link. Will not
overwrite <i>new_name</i> if it already exists (raising a subclass
of <code>SystemCallError</code>). Not available on all platforms.

   File.link("testfile", ".testfile")   #=> 0
   IO.readlines(".testfile")[0]         #=> "This is line one\n"


@overload link(old_name, new_name)
  @return [0]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;File.link;;;IC;	"
;
u;File.link;0;
"@return [0];[;[o:YARD::Tags::Tag
;
0;0:@types["0:
@text":@tag_name"return;0:@parameters[[:
old_name0[:
new_name0;0:@signature"link(old_name, new_name);"
overload:@current_file_has_commentsF:@scope:
class;[:@docstring_extra0:@files[["file.c0:@namespaceu;	File:
@path"File.link;[:@visibility:public:@source"ñ/*
 *  call-seq:
 *     File.link(old_name, new_name)    => 0
 *  
 *  Creates a new name for an existing file using a hard link. Will not
 *  overwrite <i>new_name</i> if it already exists (raising a subclass
 *  of <code>SystemCallError</code>). Not available on all platforms.
 *     
 *     File.link("testfile", ".testfile")   #=> 0
 *     IO.readlines(".testfile")[0]         #=> "This is line one\n"
 */

static VALUE
rb_file_s_link(klass, from, to)
    VALUE klass, from, to;
{
#ifdef HAVE_LINK
    SafeStringValue(from);
    SafeStringValue(to);

    if (link(StringValueCStr(from), StringValueCStr(to)) < 0) {
    sys_fail2(from, to);
    }
    return INT2FIX(0);
#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/link_c.dat
pry-doc-0.5.0 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.4.6 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.4.5 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/File/link_c.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/File/link_c.dat