commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject svn commit: r463913 - /jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java
Date Sat, 14 Oct 2006 11:08:14 GMT
Author: scolebourne
Date: Sat Oct 14 04:08:13 2006
New Revision: 463913

URL: http://svn.apache.org/viewvc?view=rev&rev=463913
Log:
Spelling, javadoc, variable names

Modified:
    jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java

Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java?view=diff&rev=463913&r1=463912&r2=463913
==============================================================================
--- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java (original)
+++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java Sat
Oct 14 04:08:13 2006
@@ -141,7 +141,7 @@
  * scenarios.
  *
  * <a name="external"></a>
- * <h4>3.1 External / Mult-threaded</h4>
+ * <h4>3.1 External / Multi-threaded</h4>
  *
  * This example provides a <code>cancel()</code> method for external processes
to
  * indcate that processing must stop. Calling this method sets a
@@ -289,15 +289,16 @@
             handleDirectoryStart(directory, depth, results);
             int childDepth = depth + 1;
             if (depthLimit < 0 || childDepth <= depthLimit) {
-                File[] files = (filter == null ? directory.listFiles() : directory.listFiles(filter));
-                if (files == null) {
+                File[] childFiles = (filter == null ? directory.listFiles() : directory.listFiles(filter));
+                if (childFiles == null) {
                     handleRestricted(directory, childDepth, results);
                 } else {
-                    for (int i = 0; i < files.length; i++) {
-                        if (files[i].isDirectory()) {
-                            walk(files[i], childDepth, results);
+                    for (int i = 0; i < childFiles.length; i++) {
+                        File childFile = childFiles[i];
+                        if (childFile.isDirectory()) {
+                            walk(childFile, childDepth, results);
                         } else {
-                            handleFile(files[i], childDepth, results);
+                            handleFile(childFile, childDepth, results);
                         }
                     }
                 }
@@ -410,6 +411,8 @@
 
     /**
      * Overridable callback method invoked when the operation is cancelled.
+     * The file being processed when the cancellation occurred can be
+     * obtained from the exception.
      * <p>
      * This implementation just re-throws the {@link CancelException}.
      *
@@ -425,6 +428,7 @@
         throw cancel;
     }
 
+    //-----------------------------------------------------------------------
     /**
      * CancelException is thrown in DirectoryWalker to cancel the current
      * processing.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message