File Attributes from DirectoryStream (WindowsPathWithAttributes)?
Bernd Eckenfels
ecki at zusammenkunft.net
Fri Aug 10 06:05:55 UTC 2018
Hello,
in sun.nio.fs.WindowsDirectoryStream I see that the code which iterates the Directory goes to some length to retain the file attributes returned from that function (by attaching them to a WindowsPathWithAttributes (aka BasicFileAttributesHolder).
And indeed I can see that class in my DirectroyStream Iterator or Filter. However I do not see that the normal WindowsFilesystemProvider (or actually WindowsFileAttributes#get() check for instances of that. This way None of the Files.getAttributeView seem to Benefit from that.
So I wonder is this missing or is there some other way you are supposed to work with this cached Attributes?
For 8 I can work with instanceof, but that might no longer be an Option with JPMS.
Gruss
Bernd
--
http://bernd.eckenfels.net
More information about the core-libs-dev
mailing list