A DESCRIPTION OF THE PROBLEM :
WindowsFileAttributes truncates file time stamps to microseconds, even though it reads from the OS timestamps with a higher resolution (100ns on NTFS). Since there is now FileTime.from(Instant), this is no longer necessary.
Expected: getting a file time stamp through Java on Windows accurately reports the full file system timestamp, including the 100ns part on NTFS.
Justification: this is important for Java programs that need to get or produce file time stamps identical to those produced by external programs.
(In 8181493 the motivation was to have identical timestamps to external "diff". In my case, it's having the same timestamps in JGit as in the C implementation of git.)
WindowsFileAttributes truncates file time stamps to microseconds, even though it reads from the OS timestamps with a higher resolution (100ns on NTFS). Since there is now FileTime.from(Instant), this is no longer necessary.
Expected: getting a file time stamp through Java on Windows accurately reports the full file system timestamp, including the 100ns part on NTFS.
Justification: this is important for Java programs that need to get or produce file time stamps identical to those produced by external programs.
(In 8181493 the motivation was to have identical timestamps to external "diff". In my case, it's having the same timestamps in JGit as in the C implementation of git.)
- relates to
-
JDK-8181493 (fs) Files.readAttributes(path, BasicFileAttributes.class) should preserve nano second time stamps
-
- Resolved
-
- links to