pub fn create_absolute_symlinks_directory(path: impl AsRef<Path>) -> Result<()> {
        let symlinks = path.as_ref();

        let subdir = symlinks.join("subdir");
        fs::create_dir(&subdir)
            .wrap_err(format!("Failed to create directory: {}", subdir.display()))?;

        let dir_link_path = symlinks.join("absolute_link_to_dir");
        create_symlink(&subdir, &dir_link_path, false).wrap_err(format!(
            "Failed to create symlink '{}' to: {}",
            dir_link_path.display(),
            subdir.display()
        ))?;

        let filepath = symlinks.join("file.txt");
        fs::write(&filepath, "Some data").wrap_err(format!(
            "Failed to write to file at: {}",
            filepath.display()
        ))?;

        let file_link_path = symlinks.join("absolute_link_to_file.txt");
        create_symlink(&filepath, &file_link_path, false).wrap_err(format!(
            "Failed to create symlink '{}' to: {}",
            file_link_path.display(),
            filepath.display()
        ))?;

        Ok(())
    }
/// Creates a temporary directory at the specified path and populates it with absolute
/// symlinks.
///
/// The purpose of passing in the directory is to allow the test to have control over where the
/// temporary directory is created.
Creates a temporary directory at the specified path and populates it with absolute
symlinks.

The purpose of passing in the directory is to allow the test to have control over where the
temporary directory is created.
Creates a temporary directory at the specified path and populates it with absolute symlinks . The purpose of passing in the directory is to allow the test to have control over where the temporary directory is created .
pub fn create_absolute_symlinks_directory(path: impl AsRef<Path>) -> Result<()> {
        let symlinks = path.as_ref();
        let subdir = symlinks.join("subdir");
        fs::create_dir(&subdir)
            .wrap_err(format!("Failed to create directory: {}", subdir.display()))?;
        let dir_link_path = symlinks.join("absolute_link_to_dir");
        create_symlink(&subdir, &dir_link_path, false).wrap_err(format!(
            "Failed to create symlink '{}' to: {}",
            dir_link_path.display(),
            subdir.display()
        ))?;
        let filepath = symlinks.join("file.txt");
        fs::write(&filepath, "Some data").wrap_err(format!(
            "Failed to write to file at: {}",
            filepath.display()
        ))?;
        let file_link_path = symlinks.join("absolute_link_to_file.txt");
        create_symlink(&filepath, &file_link_path, false).wrap_err(format!(
            "Failed to create symlink '{}' to: {}",
            file_link_path.display(),
            filepath.display()
        ))?;
        Ok(())
    }
pub fn create_absolute_symlinks_directory ( path : impl AsRef < Path > ) -> Result < ( ) > { let symlinks = path . as_ref ( ) ; let subdir = symlinks . join ( " " ) ; fs :: create_dir ( & subdir ) . wrap_err ( format ! ( " " subdir display ( ) ) ) ? ; let dir_link_path = symlinks . join ( " " ) ; create_symlink ( & subdir , & dir_link_path , false ) . wrap_err ( format ! ( " " dir_link_path display ( ) subdir display ( ) ) ) ? ; let filepath = symlinks . join ( " " ) ; fs :: write ( & filepath , " " ) . wrap_err ( format ! ( " " filepath display ( ) ) ) ? ; let file_link_path = symlinks . join ( " " ) ; create_symlink ( & filepath , & file_link_path , false ) . wrap_err ( format ! ( " " file_link_path display ( ) filepath display ( ) ) ) ? ; Ok ( ( ) ) }
Creates a temporary directory at the specified path and populates it with absolute
symlinks.
Creates a temporary directory at the specified path and populates it with absolute symlinks .
path
impl AsRef<Path>
path
impl AsRef<Path>