Function symlink::symlink_file [] [src]

pub fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(
    src: P,
    dst: Q
) -> Result<()>

Create a symlink to a file.

On Windows, this is equivalent to std::os::windows::fs::symlink_file. If you call it with a directory as the destination, TODO CONSEQUENCES.

On Unix, this is equivalent to std::os::unix::fs::symlink. If you call it with a directory as the destination, nothing bad will happen, but you’re ruining your cross-platform technique and ruining the point of this crate, so please don’t.

Errors

An error will be returned if the symlink cannot be created.