Creates a hard link to the file.
impl File {
fn link<P>(&self, path: P) -> Result<(), Errno>
where P: ToCString,
}| Name | Description |
|---|---|
| path | The path at which the link will be created. |
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.