pub trait GenFSExt {
// Required method
fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
src: P,
dst: Q,
) -> Result<()>;
}
Expand description
Unix specific rsfs::GenFS
extensions.
Required Methods§
Sourcefn symlink<P: AsRef<Path>, Q: AsRef<Path>>(&self, src: P, dst: Q) -> Result<()>
fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(&self, src: P, dst: Q) -> Result<()>
Creates a new symbolic link on the filesystem.
The dst
path will be a symbolic link pointing to the src
path.
§Examples
use rsfs::*;
use rsfs::unix_ext::*;
use rsfs::mem::FS;
let fs = FS::new();
fs.symlink("a.txt", "b.txt")?;
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.