Sha256: 436a40a0b35befa8d05534501a947f39088bd2c6b6b48835eb4826151bac85a7

Contents?: true

Size: 951 Bytes

Versions: 6

Compression:

Stored size: 951 Bytes

Contents

def syncrwdaddressdata
    require 'fileutils'
   @rwdaddressessyncresult  = ""
 begin
    
@rwdaddressessyncresult  = "updating local files" + "\n" 
    Dir.chdir($progdir)
    
    localfileListarray = Dir.new($addressfiles_directory).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /nam$/) }
      remotefileListarray = Dir.new($rwdaddresses_updatedirectory ).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /nam$/) }
  
    tempupdatefilelistarray = remotefileListarray -   localfileListarray 
    
   if  tempupdatefilelistarray
           tempupdatefilelistarray.each do |temp|
            tmpfilenametosync = File.join($rwdaddresses_updatedirectory,temp)
            tmpfilenamecopied = File.join($addressfiles_directory,temp)
             FileUtils.cp( tmpfilenametosync, tmpfilenamecopied)
            @rwdaddressessyncresult  =   @rwdaddressessyncresult + temp + "\n"   
      
      end
      end

  
rescue
 

print "sync error"
end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rwdaddresses-0.95 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-0.98 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-0.97 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-0.99 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-0.94 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-1.01 code/superant.com.rwdaddresses/syncrwdaddress.rb