Creates a hard link.
fn link<P, Q>(source: P, link: Q) -> Result<(), Errno>
where Q: ToCString,
P: ToCString,| Name | Description |
|---|---|
| source | The path of the file we want to link to. |
| link | The path of the new hard link. |
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.