# this method views an existing address record def loadgutenbergrecord require 'fileutils' begin # exception trapped block tmpdirname = File.dirname(@a_viewgutenberghtml) tmpext = File.extname(@a_viewgutenberghtml) tmpfilename = File.basename(@a_viewgutenberghtml,"#{tmpext}") newname = tmpfilename.to_s + ".lnk" fileName = File.join(tmpdirname,newname) if File.file?( fileName) fd = File.open(fileName,"r") @a_gutenbergdata = fd.read fd.close else @a_gutenbergdata = "#{fileName} does not exit" end tmpnewname = tmpfilename.to_s + tmpext @a_viewgutenberg = File.join(tmpdirname,tmpnewname) rescue SystemCallError, StandardError $rwdtinkerlog.error "system call error: #{$!}" end # exception rescue end