Sha256: 4f7a9eac87b25e2e31ac6e0ce4314c91be9ebd674af636eacf9ad4985929f8d3
Contents?: true
Size: 914 Bytes
Versions: 31
Compression:
Stored size: 914 Bytes
Contents
# == ShellManager::Symlink # # A ShellManager driver providing access to the symbolic link +ln_s+ command # found on Unix-like systems. class AutomateIt::ShellManager::Symlink < AutomateIt::ShellManager::BaseLink depends_on \ :libraries => %w(pathname), :callbacks => [lambda{ # JRuby can make symlinks but can't read them. RUBY_PLATFORM !~ /java|mswin/i and File.respond_to?(:symlink) }] def suitability(method, *args) # :nodoc: # Level must be higher than Portable return available? ? 2 : 0 end # See ShellManager#provides_symlink? def provides_symlink? available? ? true : false end # See ShellManager#ln_s def ln_s(sources, target, opts={}) _ln(sources, target, {:symbolic => true}.merge(opts)) end # See ShellManager#ln_sf def ln_sf(sources, target, opts={}) _ln(sources, target, {:symbolic => true, :force => true}.merge(opts)) end end
Version data entries
31 entries across 31 versions & 2 rubygems