-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b27
We currently get boolean attributes in bulk and call something like this to get to a particular attribute:
(fs.getBooleanAttributes(f) & FileSystem.BA_EXISTS) != 0
By instead providing a utility that takes the attribute value, we can simplify the logic at call-sites a bit:
fs.getBooleanAttribute(f, FileSystem.BA_EXISTS)
This also allows for an optimization since UnixFileSystem.getBooleanAttributes slices out and read the BA_HIDDEN bit from the name.
(fs.getBooleanAttributes(f) & FileSystem.BA_EXISTS) != 0
By instead providing a utility that takes the attribute value, we can simplify the logic at call-sites a bit:
fs.getBooleanAttribute(f, FileSystem.BA_EXISTS)
This also allows for an optimization since UnixFileSystem.getBooleanAttributes slices out and read the BA_HIDDEN bit from the name.