Sha256: 824eb2e02b3a0c1ea482d08fea4be1163abc117cec89acd93b757fe81854928c

Contents?: true

Size: 868 Bytes

Versions: 7

Compression:

Stored size: 868 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

7 entries across 7 versions & 2 rubygems

Version Path
bigtinker-0.94 code/superant.com.rwdaddresses/syncrwdaddress.rb
bigtinker-0.93 code/superant.com.rwdaddresses/syncrwdaddress.rb
bigtinker-0.96 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-1.02 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-1.03 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-1.05 code/superant.com.rwdaddresses/syncrwdaddress.rb
rwdaddresses-1.04 code/superant.com.rwdaddresses/syncrwdaddress.rb