Skip to main content

stage_hard_link

Function stage_hard_link 

Source
fn stage_hard_link(
    host: &[u8],
    name: u8,
    candidates: &[PathBuf],
) -> Option<PathBuf>
Expand description

Makes a hard link named name to host in a staging directory on its mount, creating one under the first of candidates that allows it.

§Arguments

  • host - Existing path.
  • name - The alias name held by the caller.
  • candidates - Where a staging directory may be created, in order.

§Returns

The hard link’s path, or None when no directory on that mount can hold one: a read-only mount, no writable candidate on it, or a symlink of another owner under fs.protected_hardlinks.