getting known keys from an AttributeView
Joel Uckelman
uckelman at nomic.net
Mon Jan 25 12:36:26 PST 2010
I've noticed that there seems to be no way to implement Path.readAttributes()
without hardcoding all of the known attribute keys. For example, if you
receive "foo:*" as an argument, then the docs require that you return a
Map containing all of the FooAttributeView keys and their values. I see no
programmatic way to find out what keys FooAttributeView supports, so the
only thing I can do is build the map by hand, pair by pair. This is rather
inconvenient, and generates a lot of boilerplate code. Have I missed
something?
It would be helpful if AttributeView had a keys() method which returned a
String[] of the keys it supports via Path.getAttribute().
--
J.
More information about the nio-dev
mailing list