This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push: new 092dd26db Javadoc 092dd26db is described below commit 092dd26db67b2fe3936fcfc093d1da67b9a5e1e2 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Mar 31 10:55:24 2025 -0400 Javadoc --- .../commons/io/file/attribute/FileTimes.java | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/io/file/attribute/FileTimes.java b/src/main/java/org/apache/commons/io/file/attribute/FileTimes.java index d51e604e3..3d54b5116 100644 --- a/src/main/java/org/apache/commons/io/file/attribute/FileTimes.java +++ b/src/main/java/org/apache/commons/io/file/attribute/FileTimes.java @@ -30,8 +30,13 @@ /** * Helps use {@link FileTime} and interoperate Date and NTFS times. + * <p> + * An NTFS file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated + * Universal Time (UTC). This is the offset of Windows time 0 to Unix epoch in 100-nanosecond intervals. + * </p> * * @since 2.12.0 + * @see <a href="https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times">NTFS File Times</a> */ public final class FileTimes { @@ -156,7 +161,7 @@ static Date ntfsTimeToDate(final BigDecimal ntfsTime) { } /** - * Converts NTFS time (100 nanosecond units since 1 January 1601) to Java time. + * Converts an NTFS time (100 nanosecond units since 1 January 1601) to a {@link Date}. * <p> * An NTFS file time is a 64-bit value for the number of 100-nanosecond intervals since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC). * </p> @@ -170,7 +175,7 @@ public static Date ntfsTimeToDate(final long ntfsTime) { } /** - * Converts NTFS time (100-nanosecond units since 1 January 1601) to a FileTime. + * Converts an NTFS time (100-nanosecond units since 1 January 1601) to a {@link FileTime}. * <p> * An NTFS file time is a 64-bit value for the number of 100-nanosecond intervals since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC). * </p> @@ -195,7 +200,7 @@ static Instant ntfsTimeToInstant(final long ntfsTime) { } /** - * Adds milliseconds to a source FileTime. + * Adds milliseconds to a {@link FileTime}. * * @param fileTime The source FileTime. * @param millisToAdd The milliseconds to add. @@ -206,7 +211,7 @@ public static FileTime plusMillis(final FileTime fileTime, final long millisToAd } /** - * Adds nanoseconds from a source FileTime. + * Adds nanoseconds to a {@link FileTime}. * * @param fileTime The source FileTime. * @param nanosToSubtract The nanoseconds to subtract. @@ -217,7 +222,7 @@ public static FileTime plusNanos(final FileTime fileTime, final long nanosToSubt } /** - * Adds seconds to a source FileTime. + * Adds seconds to a {@link FileTime}. * * @param fileTime The source FileTime. * @param secondsToAdd The seconds to add. @@ -238,7 +243,7 @@ public static void setLastModifiedTime(final Path path) throws IOException { } /** - * Converts {@link FileTime} to a {@link Date}. If the provided FileTime is {@code null}, the returned Date is also {@code null}. + * Converts a {@link FileTime} to a {@link Date}. If the provided FileTime is {@code null}, the returned Date is also {@code null}. * * @param fileTime the file time to be converted. * @return a {@link Date} which corresponds to the supplied time, or {@code null} if the time is {@code null}. @@ -249,7 +254,7 @@ public static Date toDate(final FileTime fileTime) { } /** - * Converts {@link Date} to a {@link FileTime}. If the provided Date is {@code null}, the returned FileTime is also {@code null}. + * Converts a {@link Date} to a {@link FileTime}. If the provided Date is {@code null}, the returned FileTime is also {@code null}. * * @param date the date to be converted. * @return a {@link FileTime} which corresponds to the supplied date, or {@code null} if the date is {@code null}. @@ -293,7 +298,7 @@ static long toNtfsTime(final Instant instant) { } /** - * Converts Java time (milliseconds since Epoch) to NTFS time. + * Converts a Java time (milliseconds since Epoch) to NTFS time. * <p> * An NTFS file time is a 64-bit value for the number of 100-nanosecond intervals since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC). * </p> @@ -308,7 +313,7 @@ public static long toNtfsTime(final long javaTime) { } /** - * Converts {@link FileTime} to standard Unix time in seconds. + * Converts a {@link FileTime} to standard Unix time in seconds. * <p> * The returned seconds value may lie out of bounds of Unix time. Check with {@link FileTimes#isUnixTime(long)}. * </p>