method

link

ruby latest stable - Class: FileUtils::Entry_

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

link(dest)
public

No documentation available.

# File lib/fileutils.rb, line 1333
    def link(dest)
      case
      when directory?
        if !File.exist?(dest) and descendant_directory?(dest, path)
          raise ArgumentError, "cannot link directory %s to itself %s" % [path, dest]
        end
        begin
          Dir.mkdir dest
        rescue
          raise unless File.directory?(dest)
        end
      else
        File.link path(), dest
      end
    end