remm 2003/06/21 16:25:27 Modified: catalina/src/share/org/apache/catalina/startup ExpandWar.java Log: - Remove duplicate names :-D - Group public methods together. Revision Changes Path 1.3 +29 -30 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ExpandWar.java Index: ExpandWar.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ExpandWar.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ExpandWar.java 21 Jun 2003 19:59:46 -0000 1.2 +++ ExpandWar.java 21 Jun 2003 23:25:27 -0000 1.3 @@ -86,7 +86,6 @@ * @author Craig R. McClanahan * @author Remy Maucherat * @author Glenn L. Nielsen - * @author Remy Maucherat * @version $Revision$ */ @@ -265,6 +264,31 @@ /** + * Delete the specified directory, including all of its contents and + * subdirectories recursively. + * + * @param dir File object representing the directory to be deleted + */ + public static void deleteDir(File dir) { + + String files[] = dir.list(); + if (files == null) { + files = new String[0]; + } + for (int i = 0; i < files.length; i++) { + File file = new File(dir, files[i]); + if (file.isDirectory()) { + deleteDir(file); + } else { + file.delete(); + } + } + dir.delete(); + + } + + + /** * Expand the specified input stream into the specified directory, creating * a file named from the specified relative path. * @@ -288,31 +312,6 @@ output.write(buffer, 0, n); } output.close(); - - } - - - /** - * Delete the specified directory, including all of its contents and - * subdirectories recursively. - * - * @param dir File object representing the directory to be deleted - */ - public static void deleteDir(File dir) { - - String files[] = dir.list(); - if (files == null) { - files = new String[0]; - } - for (int i = 0; i < files.length; i++) { - File file = new File(dir, files[i]); - if (file.isDirectory()) { - deleteDir(file); - } else { - file.delete(); - } - } - dir.delete(); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]