Sha256: e5d1e2b6b571e641bf1750088582dffa900026f41443433f5635e3b40e805331
Contents?: true
Size: 774 Bytes
Versions: 7
Compression:
Stored size: 774 Bytes
Contents
#view name def viewnamedata require 'fileutils' $currentnametext = "%s" % [@a_viewnamedata] photoname = $currentnametext + ".jpg" begin # exception trapped block path_to = File.join( "rwd_files", "contacttmp.jpg" ) path_from = File.join($addressfiles_directory, photoname ) if ! File.exist?(path_from) path_from = File.join($addressfiles_directory,"nophoto.jpg" ) end Dir.chdir($progdir) FileUtils.cp(path_from, path_to) sleep $photodelay fileName = $addressfiles_directory + "/" + $currentnametext + ".nam" fd = File.open(fileName,"r") @viewnamedatadisplay = " " while ! fd.eof? @viewnamedatadisplay = fd.read end fd.close rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end
Version data entries
7 entries across 7 versions & 2 rubygems