class Bundler::Thor::Actions::CreateLink
:nodoc:
data, just takes a source string from the user.
CreateLink is a subset of CreateFile, which instead of taking a block of
def exists?
def exists? super || File.symlink?(destination) end
def identical?
Boolean:: true if it is identical, false otherwise.
==== Returns
Checks if the content of the file at the destination is identical to the rendered result.
def identical? exists? && File.identical?(render, destination) end
def invoke!
def invoke! invoke_with_conflict_check do FileUtils.mkdir_p(File.dirname(destination)) # Create a symlink by default config[:symbolic] = true if config[:symbolic].nil? File.unlink(destination) if exists? if config[:symbolic] File.symlink(render, destination) else File.link(render, destination) end end given_destination end