Sha256: b976c4ff256b237b0daa1cd9ed86eb1f99f1b9f81df16bba98d41c396a39cc1a
Contents?: true
Size: 836 Bytes
Versions: 1
Compression:
Stored size: 836 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rwdmovies-0.93 | code/superant.com.rwdmovies/createmovierecord.rb |