* ext/pathname/pathname.c (path_make_symlink): Pathname#make_symlink
translated from pathname.rb. -- この行以は下無視されます -- M ChangeLog M ext/pathname/lib/pathname.rb M ext/pathname/pathname.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
98f53d5db2
commit
05d9fabda1
@ -1,3 +1,8 @@
|
|||||||
|
Thu Aug 12 23:39:02 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* ext/pathname/pathname.c (path_make_symlink): Pathname#make_symlink
|
||||||
|
translated from pathname.rb.
|
||||||
|
|
||||||
Thu Aug 12 21:18:27 2010 Tanaka Akira <akr@fsij.org>
|
Thu Aug 12 21:18:27 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/pathname/pathname.c (path_lstat): Pathname#lstat translated
|
* ext/pathname/pathname.c (path_lstat): Pathname#lstat translated
|
||||||
|
@ -512,9 +512,6 @@ end
|
|||||||
|
|
||||||
class Pathname # * File *
|
class Pathname # * File *
|
||||||
|
|
||||||
# See <tt>File.symlink</tt>. Creates a symbolic link.
|
|
||||||
def make_symlink(old) File.symlink(old, @path) end
|
|
||||||
|
|
||||||
# See <tt>File.truncate</tt>. Truncate the file to +length+ bytes.
|
# See <tt>File.truncate</tt>. Truncate the file to +length+ bytes.
|
||||||
def truncate(length) File.truncate(@path, length) end
|
def truncate(length) File.truncate(@path, length) end
|
||||||
|
|
||||||
|
@ -393,6 +393,18 @@ path_lstat(VALUE self)
|
|||||||
return rb_funcall(rb_cFile, rb_intern("lstat"), 1, get_strpath(self));
|
return rb_funcall(rb_cFile, rb_intern("lstat"), 1, get_strpath(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
* pathname.make_symlink(old)
|
||||||
|
*
|
||||||
|
* See <tt>File.symlink</tt>. Creates a symbolic link.
|
||||||
|
*/
|
||||||
|
static VALUE
|
||||||
|
path_make_symlink(VALUE self, VALUE old)
|
||||||
|
{
|
||||||
|
return rb_funcall(rb_cFile, rb_intern("symlink"), 2, old, get_strpath(self));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* == Pathname
|
* == Pathname
|
||||||
*
|
*
|
||||||
@ -609,4 +621,5 @@ Init_pathname()
|
|||||||
rb_define_method(rb_cPathname, "rename", path_rename, 1);
|
rb_define_method(rb_cPathname, "rename", path_rename, 1);
|
||||||
rb_define_method(rb_cPathname, "stat", path_stat, 0);
|
rb_define_method(rb_cPathname, "stat", path_stat, 0);
|
||||||
rb_define_method(rb_cPathname, "lstat", path_lstat, 0);
|
rb_define_method(rb_cPathname, "lstat", path_lstat, 0);
|
||||||
|
rb_define_method(rb_cPathname, "make_symlink", path_make_symlink, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user