Sha256: bf5c925d323120c20f06eecf97c9782de70e099970e21a8fc2da610e4b09f110
Contents?: true
Size: 759 Bytes
Versions: 2
Compression:
Stored size: 759 Bytes
Contents
# this method adds a new record def createmovierecord require 'fileutils' if @a_moviefilename newname = "%s" % [@a_moviefilename] # grab the new filename to create newdata =@a_moviefilename.to_s # make the filename the first line of data fullnewname = newname + ".nam" begin # exception trapped block fileName = File.join( $rwdmovies_directory, fullnewname ) fd = File.open(fileName,"w") fd.print(newdata) # save the record info to the file fd.close @listpicturesfromtmp=newdata + " file created" #show the record info in the browser rescue SystemCallError, StandardError @listpicturesfromtmp = "file creation error: " + $! $stderr.print "system call error: " + $! end # exception rescue end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rwdmovies-0.95 | code/superant.com.rwdmovies/createmovierecord.rb |
rwdmovies-0.94 | code/superant.com.rwdmovies/createmovierecord.rb |