1 String path= ApplicationConfigure.getProperty("rootPath"); 2 clearFiles(path+File.separator+id); 3 //删除磁盘上文件和目录 4 private void clearFiles(String workspaceRootPath){ 5 File file = new File(workspaceRootPath); 6 deleteFile(file); 7 } 8 9 private void deleteFile(File file){10 if(file.exists()){11 if(file.isDirectory()){12 File[] files = file.listFiles();13 for(int i=0; i