getAttribute

inline fun Path.getAttribute(attribute: String, vararg options: LinkOption): Any?(source)

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.

Since Kotlin

1.5

See also

Throws

if the attribute view is not supported.

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