Function lrs::file::link

Creates a hard link.

Syntax

fn link<P, Q>(source: P, link: Q) -> Result<(), Errno>
    where Q: ToCString,
          P: ToCString,

Arguments

NameDescription
source

The path of the file we want to link to.

link

The path of the new hard link.

Remarks

If source refers to a symbolic link, the new link will refer to the symbolic link and not the target of the symbolic link.

source and link have to be located in the same mount point.

If the paths are relative, they will be interpreted relative to the current working directory.

See also