class Bio::Command::Tmpdir::Remover

Internal use only. Users should not use this class directly.

Bio::Command::Tmpdir::Remover is a class to remove temporary directory.

Acknowledgement: The essense of the code is taken from tempfile.rb in Ruby trunk (svn 34413) and in Ruby 1.8.7.

Public Class Methods

new(data) click to toggle source

Internal use only. Users should not call this method.

    # File lib/bio/command.rb
637 def initialize(data)
638   @pid = $$
639   @data = data
640 end

Public Instance Methods

call(*args) click to toggle source

Internal use only. Users should not call this method.

    # File lib/bio/command.rb
643 def call(*args)
644   return if @pid != $$
645 
646   path, = *@data
647 
648   STDERR.print "removing ", path, "..." if $DEBUG
649   if path and !path.empty? and
650       File.directory?(path) and
651       !File.symlink?(path) then
652     Bio::Command.remove_entry_secure(path)
653     $stderr.print "done\n" if $DEBUG
654   else
655     $stderr.print "skipped\n" if $DEBUG
656   end
657 end