class EC2::Platform::Linux::Rsync::Command
Constants
- EXECUTABLE
Public Class Methods
new(e = EXECUTABLE)
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 18 def initialize(e = EXECUTABLE) @src = nil @dst = nil @options = [] @executable = e @quiet = false end
Public Instance Methods
archive()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 26 def archive; @options << '-rlpgoD'; self; end
dereference()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 31 def dereference; @options << '-L'; self; end
dst(path)
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 35 def dst(path) @dst = path; self; end
Also aliased as: destination, to, destination, to
exclude(files)
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 43 def exclude(files) if files.is_a? Array files.each {|file| exclude file } else @options << "--exclude '#{files}'" unless files.nil? end self end
expand()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 61 def expand "#{@executable} #{@options.join(' ')} #{@src} #{@dst} #{'2>&1 > /dev/null' if @quiet}".strip end
include(files)
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 52 def include(files) if files.is_a? Array files.each {|file| include file } else @options << "--include '#{files}'" unless files.nil? end self end
links()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 30 def links; @options << '-l'; self; end
quietly()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 36 def quietly; @quiet = true; self; end
recursive()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 28 def recursive; @options << '-r'; self; end
sparse()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 29 def sparse; @options << '-S'; self; end
src(path)
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 34 def src(path) @src = path; self; end
times()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 27 def times; @options << '-t'; self; end
version()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 33 def version; @options << '--version'; self; end
xattributes()
click to toggle source
# File lib/ec2/platform/linux/rsync.rb, line 32 def xattributes; @options << '-X'; self; end