Skip to content
class method

File.symlink

(::string | ::_ToPath old_name, ::string | ::_ToPath new_name) -> 0
File.symlink(old_name, new_name) → 0

Creates a symbolic link called new_name for the existing file old_name. Raises a NotImplemented exception on platforms that do not support symbolic links.

Example
File.symlink("testfile", "link2test")   #=> 0
See also .symlink? .sticky? .stat .truncate also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0