import java.io.*; public class Delete{ /** * constructor of this */ public Delete(String path){ while(path.endsWith("/")){ path= path.substring(0, path.length()-1); } process(path); } /** * process */ private void process(String path){ File dir= new File(path); if(dir.exists()){ String[] list= dir.list(); for(int i=0; i"); }else{ new Delete(args[0]); } } }