Sha256: 48adafbd5ec075658d4ea5fec2eee6150cfd7f3a78f036e33d62ce8854ef2164
Contents?: true
Size: 634 Bytes
Versions: 15
Compression:
Stored size: 634 Bytes
Contents
module Uricp::Strategy class LocalLink include Uricp::Strategy::Common def appropriate? return proposal if all_local_files? && !format_change? && linkable? debug "#{self.class.name}: not appropriate" false end def command "ln -fT #{from.path} #{to.path};" end def proposal @proposed_options = options.dup @proposed_options['from_uri'] = @proposed_options['to_uri'] self end def linkable? File.stat(File.dirname(from.path)).dev == File.stat(File.dirname(to.path)).dev && (!File.exist?(to.path) || File.file?(to.path)) end end end
Version data entries
15 entries across 15 versions & 1 rubygems