Function lrs::file::set_attr

Sets an attribute of a file.

Syntax

fn set_attr<P, S, V>(path: P, name: S, val: V) -> Result<(), Errno>
    where V: AsRef<[u8]>,
          S: ToCString,
          P: ToCString,

Arguments

NameDescription
path

The path of the file whose attribute to change.

name

The name of the attribute.

val

The new value of the attribute.

Remarks

If the attribute does not exist, it will be created. If the attribute exists, it will be overwritten.

If the path refers to a symbolic link, the link will be recursively resolved and the attribute of the first non-link target will be set.

If the path is relative, it will be interpreted relative to the current working directory.

See also