fn generate_random_hardlink<P: AsRef<Path>>(&mut self, path: P, potential_files: &[PathBuf]) -> bool {
		match potential_files.choose(&mut self.rng) {
			Some(target) => {
				fs::hard_link(target, path).unwrap();
				true
			},
			None => false,
		}
	}
// Generate a hardlink at the given path, linking randomly to one of the potential_files.
// Returns false when potential_files is empty
Generate a hardlink at the given path, linking randomly to one of the potential_files.
Returns false when potential_files is empty
Generate a hardlink at the given path linking randomly to one of the potential_files . Returns false when potential_files is empty
fn generate_random_hardlink<P: AsRef<Path>>(&mut self, path: P, potential_files: &[PathBuf]) -> bool {
		match potential_files.choose(&mut self.rng) {
			Some(target) => {
				fs::hard_link(target, path).unwrap();
				true
			},
			None => false,
		}
	}
fn generate_random_hardlink < P : AsRef < Path > > ( & mut self , path : P , potential_files : & [ PathBuf ] ) -> bool { match potential_files . choose ( & mut self . rng ) { Some ( target ) => { fs :: hard_link ( target , path ) . unwrap ( ) ; true } , None => false , } }
Generate a hardlink at the given path, linking randomly to one of the potential_files.
Generate a hardlink at the given path linking randomly to one of the potential_files .
&mut self
path
P
potential_files
&[PathBuf]
&mut self
path
P
potential_files
&[PathBuf]