pub trait SymlinkToFile {
    // Required method
    fn symlink_to_file<P>(&self, target: P) -> Result<(), FixtureError>
       where P: AsRef<Path>;
}
Expand description

Create a symlink to the target

Required Methods§

Create a symlink to the target

Examples
use assert_fs::prelude::*;

let temp = assert_fs::TempDir::new().unwrap();
let real_file = temp.child("real_file");
real_file.touch().unwrap();

temp.child("link_file").symlink_to_file(real_file.path()).unwrap();

temp.close().unwrap();

Object Safety§

This trait is not object safe.

Implementors§