app/models/bplmodels/complex_object_base.rb
## Produce a unique filename that doesn't already exist.
Produce a unique filename that doesn't already exist.
Produce a unique filename that doesn ' t already exist .
def temp_filename(basename, tmpdir='/tmp')
      n = 0
      begin
        tmpname = File.join(tmpdir, sprintf('%s%d.%d', basename, $$, n))
        lock = tmpname + '.lock'
        n += 1
      end while File.exist?(tmpname)
      tmpname
    end
def temp_filename ( basename , tmpdir = '/tmp' ) n = 0 begin tmpname = File . join ( tmpdir , sprintf ( '%s%d.%d' , basename , $$ , n ) ) lock = tmpname + '.lock' n += 1 end while File . exist? ( tmpname ) tmpname end
Produce a unique filename that doesn't already exist.
Produce a unique filename that doesn ' t already exist .
basename
tmpdir