symlink_file in std::os::windows::fs - Rust
Description: Creates a new file symbolic link on the filesystem.
Keywords: rust, rustlang, rust-lang, symlink_file

# Function std::os::windows::fs::symlink_file
1.1.0[−][src]

    pub fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(
        original: P,
        link: Q
    ) -> Result<()>

This is supported on Windows only.

Creates a new file symbolic link on the filesystem.

The `link` path will be a file symbolic link pointing to the `original` path.

# Examples

    use std::os::windows::fs;

    fn main() -> std::io::Result<()> {
        fs::symlink_file("a.txt", "b.txt")?;
        Ok(())
    }

Run