Function lrs::file::change_owner

Changes the owner of a file.

Syntax

fn change_owner<P>(path: P, user: u32, group: u32) -> Result<(), Errno>
    where P: ToCString,

Arguments

NameDescription
path

The path of the file whose owner will be changed.

user

The user id of the new owner.

group

The group id of the new owner.

Remarks

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

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

See also