Skip to content

Commit a9636bb

Browse files
committed
[IO-857] Javadoc: Update details for PathUtils "clean" behavior
1 parent 3fbb4f3 commit a9636bb

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

src/changes/changes.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ The <action> type attribute can be add,update,fix,remove.
5757
<action dev="ggregory" type="fix" issue="IO-859" due-to="JD Dean, Gary Gregory">FileUtils.forceDelete on non-existent file on Windows throws IOException rather than FileNotFoundException.</action>
5858
<action dev="ggregory" type="fix" due-to="Éamonn McManus">Use Unicode escapes for superscript characters. #701.</action>
5959
<action dev="ggregory" type="fix" issue="IO-863" due-to="Éamonn McManus, Gary Gregory">Recent incompatible change to FileUtils.listFiles re extensions, see IO-856.</action>
60-
<action dev="ggregory" type="fix" issue="IO-862" due-to="Éamonn McManus, Gary Gregory">FileUtils.deleteDirectory fails for a directory containing a broken symbolic link.</action>
60+
<action dev="ggregory" type="fix" issue="IO-857" due-to="Dmitry, Gary Gregory">Javadoc: Update details for PathUtils "clean" behavior.</action>
61+
6162
<!-- ADD -->
6263
<action dev="ggregory" type="add" due-to="Gary Gregory">Add @FunctionalInterface to ClassNameMatcher.</action>
6364
<action dev="ggregory" type="add" due-to="Gary Gregory">Add ValidatingObjectInputStream.Builder and ValidatingObjectInputStream.builder().</action>

src/main/java/org/apache/commons/io/file/CleaningPathVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static CountingPathVisitor withLongCounters() {
5757
private final boolean overrideReadOnly;
5858

5959
/**
60-
* Constructs a new visitor that deletes files except for the files and directories explicitly given.
60+
* Constructs a instance that deletes files except for the files and directories explicitly given.
6161
*
6262
* @param pathCounter How to count visits.
6363
* @param deleteOption How deletion is handled.
@@ -73,7 +73,7 @@ public CleaningPathVisitor(final PathCounters pathCounter, final DeleteOption[]
7373
}
7474

7575
/**
76-
* Constructs a new visitor that deletes files except for the files and directories explicitly given.
76+
* Constructs a new instance that deletes files except for the files and directories explicitly given.
7777
*
7878
* @param pathCounter How to count visits.
7979
* @param skip The files to skip deleting.

src/main/java/org/apache/commons/io/file/CopyDirectoryVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private static CopyOption[] toCopyOption(final CopyOption... copyOptions) {
4545
private final Path targetDirectory;
4646

4747
/**
48-
* Constructs a new visitor that deletes files except for the files and directories explicitly given.
48+
* Constructs a instance that deletes files except for the files and directories explicitly given.
4949
*
5050
* @param pathCounter How to count visits.
5151
* @param sourceDirectory The source directory
@@ -60,7 +60,7 @@ public CopyDirectoryVisitor(final PathCounters pathCounter, final Path sourceDir
6060
}
6161

6262
/**
63-
* Constructs a new visitor that deletes files except for the files and directories explicitly given.
63+
* Constructs a instance that deletes files except for the files and directories explicitly given.
6464
*
6565
* @param pathCounter How to count visits.
6666
* @param fileFilter How to filter file paths.

src/main/java/org/apache/commons/io/file/DeletingPathVisitor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static DeletingPathVisitor withLongCounters() {
5959
private final LinkOption[] linkOptions;
6060

6161
/**
62-
* Constructs a new visitor that deletes files except for the files and directories explicitly given.
62+
* Constructs a instance that deletes files except for the files and directories explicitly given.
6363
*
6464
* @param pathCounter How to count visits.
6565
* @param deleteOption How deletion is handled.
@@ -71,7 +71,7 @@ public DeletingPathVisitor(final PathCounters pathCounter, final DeleteOption[]
7171
}
7272

7373
/**
74-
* Constructs a new visitor that deletes files except for the files and directories explicitly given.
74+
* Constructs a instance that deletes files except for the files and directories explicitly given.
7575
*
7676
* @param pathCounter How to count visits.
7777
* @param linkOptions How symbolic links are handled.
@@ -90,7 +90,7 @@ public DeletingPathVisitor(final PathCounters pathCounter, final LinkOption[] li
9090
}
9191

9292
/**
93-
* Constructs a new visitor that deletes files except for the files and directories explicitly given.
93+
* Constructs a instance that deletes files except for the files and directories explicitly given.
9494
*
9595
* @param pathCounter How to count visits.
9696
*

src/main/java/org/apache/commons/io/file/PathUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private static AccumulatorPathVisitor accumulate(final Path directory, final int
227227
}
228228

229229
/**
230-
* Cleans a directory including subdirectories without deleting directories.
230+
* Cleans a directory by deleting only files, including in subdirectories, but without deleting the directories.
231231
*
232232
* @param directory directory to clean.
233233
* @return The visitation path counters.
@@ -238,7 +238,7 @@ public static PathCounters cleanDirectory(final Path directory) throws IOExcepti
238238
}
239239

240240
/**
241-
* Cleans a directory including subdirectories without deleting directories.
241+
* Cleans a directory by deleting only files, including in subdirectories, but without deleting the directories.
242242
*
243243
* @param directory directory to clean.
244244
* @param deleteOptions How to handle deletion.

0 commit comments

Comments
 (0)