pub trait SymlinkToDir {
// Required method
fn symlink_to_dir<P: AsRef<Path>>(
&self,
target: P,
) -> Result<(), FixtureError>;
}
Expand description
Create a symlink to a target directory.
Required Methods§
Sourcefn symlink_to_dir<P: AsRef<Path>>(&self, target: P) -> Result<(), FixtureError>
fn symlink_to_dir<P: AsRef<Path>>(&self, target: P) -> Result<(), FixtureError>
Create a symlink to the provided target directory.
§Examples
use camino_tempfile_ext::prelude::*;
let temp = Utf8TempDir::new().unwrap();
let real_dir = temp.child("real_dir");
real_dir.create_dir_all().unwrap();
temp.child("link_dir").symlink_to_dir(real_dir.as_path()).unwrap();
temp.close().unwrap();
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.