Sha256: 3e367880039af97e5850c461e0eec42d6b193107d4ae5e839e7be3a1b8dc631a
Contents?: true
Size: 873 Bytes
Versions: 8
Compression:
Stored size: 873 Bytes
Contents
module Uricp::Strategy class LocalLink include Uricp::Strategy::Common def appropriate? return proposal if !compression_required? && 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? from_path_dir = File.dirname(from.path) to_path_dir = File.dirname(to.path) File.directory?(from_path_dir) && File.directory?(to_path_dir) && File.stat(from_path_dir).dev == File.stat(to_path_dir).dev && (!File.exist?(to.path) || File.file?(to.path)) end end end
Version data entries
8 entries across 8 versions & 1 rubygems