setAttribute

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

Sets 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, or the attribute value is of the correct type but has an inappropriate value.

if the attribute value is not of the expected type