Top Level Namespace

Constant Summary collapse

Lldb_init_path =
File.expand_path('~')+'/.lldbinit'
Lldb_init_path_temp =
File.expand_path('~')+'/.lldbinit_temp'
Lldb_source_path =
File.expand_path('~')+'/.isource_lldb'
Lldb_file_path =
File.expand_path('~')+'/.isource_lldb/isource_lldb.py'
Commond_str =
'command script import '+Lldb_file_path

Instance Method Summary collapse

Instance Method Details

#remove_dir(path) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rubygems_plugin.rb', line 53

def remove_dir(path)
  if File.directory?(path)
    Dir.foreach(path) do |file|
      if ((file.to_s != ".") and (file.to_s != ".."))
        remove_dir("#{path}/#{file}")
      end
    end
    Dir.delete(path)
  else
    File.delete(path)
  end
end

#remove_fileObject



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/rubygems_plugin.rb', line 66

def remove_file()
  f_temp = File.new(Lldb_init_path_temp,"w")
  f = File.new(Lldb_init_path, 'r')
  f.each do |line|
    if !line.chomp.include?Commond_str
      f_temp.puts line
    end
  end
  f.close
  f_temp.close

  File.delete(Lldb_init_path)
  File.rename Lldb_init_path_temp, Lldb_init_path
  File.chmod(0664,Lldb_init_path)
  
end