link

File.link(old_name, new_name) รข 0
Class Public methods

Creates a new name for an existing file using a hard link. Will not overwrite new_name if it already exists (raising a subclass of SystemCallError). Not available on all platforms.

File.link("testfile", ".testfile")   #=> 0
IO.readlines(".testfile")[0]         #=> "This is line one\n"
doc_ruby_on_rails
2015-04-06 10:54:58
Comments
Leave a Comment

Please login to continue.