Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

FileUtils.link_entry

link_entry(src, dest, dereference_root = false, remove_destination = false)

Hard links a file system entry src to dest. If src is a directory, this method links its contents recursively.

Both of src and dest must be a path name. src must exist, dest must not exist.

If dereference_root is true, this method dereferences the tree root.

If remove_destination is true, this method removes each destination file before copy.

See also #link_entry .link .ln .install also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0