Sha256: bf5a1381fbe6fa7a3805168885b76079ebe39521d55ca996770283113e32a38a

Contents?: true

Size: 563 Bytes

Versions: 11

Compression:

Stored size: 563 Bytes

Contents

require 'timeout'
require 'tmpdir'

module Dev
module Cmd
class Clean
  def self.clean_tmp
	puts_debug "Dev::Cmd::Clean.clean_temp"
	begin
      status=Timeout::timeout(30){
	    puts_debug "tmp dir=#{Dir.tmpdir}"
	    if File.exists?(Dir.tmpdir)
	      #if RUBY_PLATFORM.include?("w32")
	      #  cmd="del /Q #{Dir.tmpdir.gsub('/','\\')}"
		  #  puts_debug cmd
	      #  `#{cmd}` if RUBY_PLATFORM.include?("w32")
	      #end
		end
	  }
	rescue
	  puts_debug "timeout met."
	end
  end
end	# class Compile
end # module Cmd
end # module Dev

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dev-1.0.159 lib/dev/cmd/Clean.rb
dev-1.0.158 lib/dev/cmd/Clean.rb
dev-1.0.157 lib/dev/cmd/Clean.rb
dev-1.0.156 lib/dev/cmd/Clean.rb
dev-1.0.155 lib/dev/cmd/Clean.rb
dev-1.0.154 lib/dev/cmd/Clean.rb
dev-1.0.153 lib/dev/cmd/Clean.rb
dev-1.0.152 lib/dev/cmd/Clean.rb
dev-1.0.151 lib/dev/cmd/Clean.rb
dev-1.0.150 lib/dev/cmd/Clean.rb
dev-1.0.149 lib/dev/cmd/Clean.rb