Sha256: f5d3f938317bca73e72e808c36662c60104cda29ebe8d2235af415ef8f501a69
Contents?: true
Size: 972 Bytes
Versions: 4
Compression:
Stored size: 972 Bytes
Contents
def syncrwdscheduledata require 'fileutils' @rwdschedulesyncresult = "" begin @rwdschedulesyncresult = "updating local files" + "\n" Dir.chdir($progdir) localfileListarray = Dir.new($rwdschedule_directory).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /sch$/) } remotefileListarray = Dir.new($rwdschedule_updatedirectory ).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /sch$/) } tempupdatefilelistarray = remotefileListarray - localfileListarray if tempupdatefilelistarray tempupdatefilelistarray.each do |temp| tmpfilenametosync = File.join($rwdschedule_updatedirectory,temp) tmpfilenamecopied = File.join($rwdschedule_directory,temp) FileUtils.cp( tmpfilenametosync, tmpfilenamecopied) @rwdschedulesyncresult = @rwdschedulesyncresult + temp + "\n" end end rescue print "sync error" end end
Version data entries
4 entries across 4 versions & 2 rubygems