@@ -0,0 +1,1299 @@
+package core;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0Aimport java.util.Properties;%0A%0Apublic class Remove %7B%0A%0A%09public void remove() %7B%0A%09%7D%0A%0A%09public boolean remove(String toremove) %7B%0A%0A%09%09String configPath = %22config%22;%0A%09%09Properties properties = new Properties();%0A%09%09try %7B%0A%09%09%09FileInputStream in = new FileInputStream(configPath);%0A%09%09%09properties.load(in);%0A%09%09%09in.close();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09System.out.println(%22Unable to load config file.%22);%0A%09%09%7D%0A%0A%09%09String fromconf = properties.getProperty(toremove, %22notfound%22);%0A%09%09if (fromconf != %22notfound%22) %7B%0A%0A%09%09%09String plugins = %22plugins%22;%0A%09%09%09String name = (fromconf.split(%22.%22))%5B1%5D;%0A%09%09%09String directorypath = (this.getClass().getResource(%22Remove.class%22)%0A%09%09%09%09%09.getPath().split(Remove.class.getName()))%5B0%5D%0A%09%09%09%09%09+ plugins + %22/%22 + name + %22/%22;%0A%09%09%09File directory = new File(directorypath);%0A%0A%09%09%09return removeaux(directory);%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%0A%09public boolean removeaux(File directory) %7B%0A%09%09boolean resultat = true;%0A%09%09if (directory.exists()) %7B%0A%09%09%09File%5B%5D files = directory.listFiles();%0A%09%09%09for (int i = 0; i %3C files.length; i++) %7B%0A%09%09%09%09if (files%5Bi%5D.isDirectory()) %7B%0A%09%09%09%09%09resultat &= removeaux(files%5Bi%5D);%0A%09%09%09%09%7D else %7B%0A%09%09%09%09%09resultat &= files%5Bi%5D.delete();%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09resultat &= directory.delete();%0A%09%09return (resultat);%0A%0A%09%7D%0A%7D%0A

Allow developpers to remove a plugin with the command line "-remove"