Skip to content

Commit f1d9aa9

Browse files
author
Gary Gregory
committed
Javadoc.
1 parent 9c8d288 commit f1d9aa9

5 files changed

Lines changed: 20 additions & 29 deletions

File tree

src/main/java/org/apache/commons/io/FileUtils.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,6 @@ public static File createParentDirectories(final File file) throws IOException {
11391139
* Gets the current directory.
11401140
*
11411141
* @return the current directory.
1142-
*
11431142
* @since 2.12.0
11441143
*/
11451144
public static File current() {
@@ -1697,7 +1696,6 @@ public static boolean isFileNewer(final File file, final File reference) {
16971696
* @return true if the {@code File} exists and has been modified after the given {@code FileTime}.
16981697
* @throws IOException if an I/O error occurs.
16991698
* @throws NullPointerException if the file or local date is {@code null}.
1700-
*
17011699
* @since 2.12.0
17021700
*/
17031701
public static boolean isFileNewer(final File file, final FileTime fileTime) throws IOException {
@@ -1708,11 +1706,10 @@ public static boolean isFileNewer(final File file, final FileTime fileTime) thro
17081706
/**
17091707
* Tests if the specified {@code File} is newer than the specified {@code Instant}.
17101708
*
1711-
* @param file the {@code File} of which the modification date must be compared.
1709+
* @param file the {@code File} of which the modification date must be compared.
17121710
* @param instant the date reference.
17131711
* @return true if the {@code File} exists and has been modified after the given {@code Instant}.
17141712
* @throws NullPointerException if the file or instant is {@code null}.
1715-
*
17161713
* @since 2.8.0
17171714
*/
17181715
public static boolean isFileNewer(final File file, final Instant instant) {
@@ -1887,7 +1884,6 @@ public static boolean isFileOlder(final File file, final File reference) {
18871884
* @return true if the {@code File} exists and has been modified before the given {@code FileTime}.
18881885
* @throws IOException if an I/O error occurs.
18891886
* @throws NullPointerException if the file or local date is {@code null}.
1890-
*
18911887
* @since 2.12.0
18921888
*/
18931889
public static boolean isFileOlder(final File file, final FileTime fileTime) throws IOException {

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

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public static PathCounters cleanDirectory(final Path directory, final DeleteOpti
224224
/**
225225
* Compares the specified {@code Path}'s last modified time to the given file time.
226226
*
227-
* @param file the {@code Path} of which the modification date must be compared
227+
* @param file the {@code Path} to test.
228228
* @param fileTime the time reference.
229229
* @param options options indicating how to handle symbolic links.
230230
* @return See {@link FileTime#compareTo(FileTime)}
@@ -312,9 +312,9 @@ public static PathCounters countDirectory(final Path directory) throws IOExcepti
312312
/**
313313
* Counts aspects of a directory including sub-directories.
314314
*
315-
* @param directory directory to delete.
315+
* @param directory directory to count.
316316
* @return The visitor used to count the given directory.
317-
* @throws IOException if an I/O error is thrown by a visitor method.
317+
* @throws IOException if an I/O error occurs.
318318
* @since 2.12.0
319319
*/
320320
public static PathCounters countDirectoryAsBigInteger(final Path directory) throws IOException {
@@ -734,7 +734,7 @@ private static FileTime getLastModifiedTime(final Path path, final LinkOption...
734734
}
735735

736736
/**
737-
* Returns a {@link Path} representing the system temporary directory.
737+
* Gets a {@link Path} representing the system temporary directory.
738738
*
739739
* @return the system temporary directory.
740740
*
@@ -804,7 +804,7 @@ public static boolean isEmptyFile(final Path file) throws IOException {
804804
/**
805805
* Tests if the specified {@code Path} is newer than the specified time reference.
806806
*
807-
* @param file the {@code Path} of which the modification date must be compared
807+
* @param file the {@code Path} to test.
808808
* @param czdt the time reference.
809809
* @param options options indicating how to handle symbolic links.
810810
* @return true if the {@code Path} exists and has been modified after the given time reference.
@@ -820,7 +820,7 @@ public static boolean isNewer(final Path file, final ChronoZonedDateTime<?> czdt
820820
/**
821821
* Tests if the specified {@code Path} is newer than the specified time reference.
822822
*
823-
* @param file the {@code Path} of which the modification date must be compared
823+
* @param file the {@code Path} to test.
824824
* @param fileTime the time reference.
825825
* @param options options indicating how to handle symbolic links.
826826
* @return true if the {@code Path} exists and has been modified after the given time reference.
@@ -838,7 +838,7 @@ public static boolean isNewer(final Path file, final FileTime fileTime, final Li
838838
/**
839839
* Tests if the specified {@code Path} is newer than the specified time reference.
840840
*
841-
* @param file the {@code Path} of which the modification date must be compared
841+
* @param file the {@code Path} to test.
842842
* @param instant the time reference.
843843
* @param options options indicating how to handle symbolic links.
844844
* @return true if the {@code Path} exists and has been modified after the given time reference.
@@ -853,7 +853,7 @@ public static boolean isNewer(final Path file, final Instant instant, final Link
853853
/**
854854
* Tests if the specified {@code Path} is newer than the specified time reference.
855855
*
856-
* @param file the {@code Path} of which the modification date must be compared
856+
* @param file the {@code Path} to test.
857857
* @param timeMillis the time reference measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970)
858858
* @param options options indicating how to handle symbolic links.
859859
* @return true if the {@code Path} exists and has been modified after the given time reference.
@@ -868,7 +868,7 @@ public static boolean isNewer(final Path file, final long timeMillis, final Link
868868
/**
869869
* Tests if the specified {@code Path} is newer than the reference {@code Path}.
870870
*
871-
* @param file the {@code File} of which the modification date must be compared.
871+
* @param file the {@code File} to test.
872872
* @param reference the {@code File} of which the modification date is used.
873873
* @return true if the {@code File} exists and has been modified more
874874
* recently than the reference {@code File}.
@@ -882,7 +882,7 @@ public static boolean isNewer(final Path file, final Path reference) throws IOEx
882882
/**
883883
* Tests if the specified {@code Path} is older than the specified time reference.
884884
*
885-
* @param file the {@code Path} of which the modification date must be compared.
885+
* @param file the {@code Path} to test.
886886
* @param fileTime the time reference.
887887
* @param options options indicating how to handle symbolic links.
888888
* @return true if the {@code Path} exists and has been modified before the given time reference.
@@ -900,7 +900,7 @@ public static boolean isOlder(final Path file, final FileTime fileTime, final Li
900900
/**
901901
* Tests if the specified {@code Path} is older than the specified time reference.
902902
*
903-
* @param file the {@code Path} of which the modification date must be compared.
903+
* @param file the {@code Path} to test.
904904
* @param instant the time reference.
905905
* @param options options indicating how to handle symbolic links.
906906
* @return true if the {@code Path} exists and has been modified after the given time reference.
@@ -915,7 +915,7 @@ public static boolean isOlder(final Path file, final Instant instant, final Link
915915
/**
916916
* Tests if the specified {@code Path} is older than the specified time reference.
917917
*
918-
* @param file the {@code Path} of which the modification date must be compared
918+
* @param file the {@code Path} to test.
919919
* @param timeMillis the time reference measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970)
920920
* @param options options indicating how to handle symbolic links.
921921
* @return true if the {@code Path} exists and has been modified before the given time reference.
@@ -930,7 +930,7 @@ public static boolean isOlder(final Path file, final long timeMillis, final Link
930930
/**
931931
* Tests if the specified {@code Path} is older than the reference {@code Path}.
932932
*
933-
* @param file the {@code File} of which the modification date must be compared.
933+
* @param file the {@code File} to test.
934934
* @param reference the {@code File} of which the modification date is used.
935935
* @return true if the {@code File} exists and has been modified before than the reference {@code File}.
936936
* @throws IOException if an I/O error occurs.
@@ -975,7 +975,6 @@ public static DirectoryStream<Path> newDirectoryStream(final Path dir, final Pat
975975
*
976976
* @param path the Path.
977977
* @param append Whether or not to append.
978-
*
979978
* @return a new OutputStream.
980979
* @throws IOException if an I/O error occurs.
981980
* @see Files#newOutputStream(Path, OpenOption...)
@@ -1210,7 +1209,6 @@ public static Path setReadOnly(final Path path, final boolean readOnly, final Li
12101209
* @throws NullPointerException if the file is {@code null}.
12111210
* @throws IllegalArgumentException if the file does not exist.
12121211
* @throws IOException if an I/O error occurs.
1213-
*
12141212
* @since 2.12.0
12151213
*/
12161214
public static long sizeOf(final Path path) throws IOException {
@@ -1228,7 +1226,6 @@ public static long sizeOf(final Path path) throws IOException {
12281226
* @throws NullPointerException if the file is {@code null}.
12291227
* @throws IllegalArgumentException if the file does not exist.
12301228
* @throws IOException if an I/O error occurs.
1231-
*
12321229
* @since 2.12.0
12331230
*/
12341231
public static BigInteger sizeOfAsBigInteger(final Path path) throws IOException {
@@ -1237,7 +1234,7 @@ public static BigInteger sizeOfAsBigInteger(final Path path) throws IOException
12371234
}
12381235

12391236
/**
1240-
* Counts the size of a directory recursively (sum of the length of all files).
1237+
* Counts the size of a directory recursively (sum of the size of all files).
12411238
* <p>
12421239
* Note that overflow is not detected, and the return value may be negative if overflow occurs. See
12431240
* {@link #sizeOfDirectoryAsBigInteger(Path)} for an alternative method that does not overflow.
@@ -1255,7 +1252,7 @@ public static long sizeOfDirectory(final Path directory) throws IOException {
12551252
}
12561253

12571254
/**
1258-
* Counts the size of a directory recursively (sum of the length of all files).
1255+
* Counts the size of a directory recursively (sum of the size of all files).
12591256
*
12601257
* @param directory directory to inspect, must not be {@code null}.
12611258
* @return size of directory in bytes, 0 if directory is security restricted.

src/main/java/org/apache/commons/io/file/attribute/FileTimes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class FileTimes {
2929

3030
/**
31-
* Constant for the {@code 1970-01-01T00:00:00Z} epoch time stamp attribute.
31+
* Constant for the {@code 1970-01-01T00:00:00Z} epoch as a time stamp attribute.
3232
*
3333
* @see Instant#EPOCH
3434
*/

src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public AgeFileFilter(final File cutoffReference, final boolean acceptOlder) {
126126
}
127127

128128
/**
129-
* Constructs a new age file filter for files equal to or older than a certain cutoff
129+
* Constructs a new age file filter for files equal to or older than a certain cutoff.
130130
*
131131
* @param cutoffInstant The cutoff time threshold measured in milliseconds since the epoch (00:00:00 GMT, January 1,
132132
* 1970).

src/main/java/org/apache/commons/io/monitor/FileEntry.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ public long getLastModified() {
214214
}
215215

216216
/**
217-
* Gets the last modified time from the last time it
218-
* was checked.
217+
* Gets the last modified time from the last time it was checked.
219218
*
220219
* @return the last modified time.
221220
* @since 2.12.0
@@ -235,8 +234,7 @@ public void setLastModified(final long lastModified) {
235234
}
236235

237236
/**
238-
* Sets the last modified time from the last time it
239-
* was checked.
237+
* Sets the last modified time from the last time it was checked.
240238
*
241239
* @param lastModified The last modified time.
242240
* @since 2.12.0

0 commit comments

Comments
 (0)