Method lrs::file::File::link

Creates a hard link to the file.

Syntax

impl File {
    fn link<P>(&self, path: P) -> Result<(), Errno>
        where P: ToCString,
}

Arguments

NameDescription
path

The path at which the link will be created.

Remarks

The new path must be in the same mount point as the opened file.

In general, this function cannot be used if there are no links to the file, e.g., because the last link was deleted after the file was opened. However, see FILE_TEMP.

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

See also