getAttribute

JVM
JRE7
1.4
@ExperimentalPathApi fun Path.getAttribute(
    attribute: String,
    vararg options: LinkOption
): Any?

Reads the value of a file attribute.

The attribute name is specified with the attribute parameter optionally prefixed with the attribute view name:

[view_name:]attribute_name

When the view name is not specified, it defaults to basic.

Exceptions

UnsupportedOperationException - if the attribute view is not supported.

IllegalArgumentException - if the attribute name is not specified or is not recognized.

See Also

Files.getAttribute