RFR: 8317687: (fs) FileStore.supportsFileAttributeView("posix") incorrectly returns 'true' for FAT32 volume on macOS

Brian Burkhalter bpb at openjdk.org
Mon Oct 9 17:55:57 UTC 2023


On Sat, 7 Oct 2023 06:22:50 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Change `BsdFileStore.supportsFileAttributeView` to return false for POSIX attributes when the associated volume file system type is FAT32.
>
> test/jdk/java/nio/file/Files/CopyAndMove.java line 158:
> 
>> 156:                                   attrs1.fileKey(), attrs1.lastModifiedTime());
>> 157:                 System.err.format("File time for %s is %s\n",
>> 158:                                   attrs2.fileKey(), attrs2.lastModifiedTime());
> 
> Are you 150% sure this is reliable?

According to [1],

"[...] the resolution of create time on FAT is 10 milliseconds, while write time has a resolution of 2 seconds and access time has a resolution of 1 day [...]"

where "write time" is "last modified time." The testing I have done has thus far borne this out.

[1] [File Times](https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16084#discussion_r1350621134


More information about the nio-dev mailing list