Package com.github.fge.filesystem.attributes.provider

File attribute view providers

See: Description

Package com.github.fge.filesystem.attributes.provider Description

File attribute view providers

Classes in this package wrap a file attribute view class and (if any) a file attributes class into a single class, and offers additional features.

The most notable feature added to this class is the ability to get and set attributes by name; the JDK offers no helper classes for this!

Also, for some attribute views, default values are provided which you can rely upon. An example is that all file times in BasicFileAttributesProvider return the Unix epoch (that is, Jan 1st, 1970 at 00:00:00 GMT) by default (this is what should be returned if the underlying object has no support for file times).

There are base implementations for all attribute views defined by the JDK. You can provide your own by implementing FileAttributesProvider (in which case you should not forget to implement a descriptor for your new view as well).

Note also that you must override write methods; by default, implementations report that writing an attribute is not supported by throwning a ReadOnlyAttributeException.

See Also:
FileAttributesFactory