MCPcopy Create free account
hub / github.com/assert-rs/assert_fs / PathCopy

Interface PathCopy

src/fixture/tools.rs:170–187  ·  view source on GitHub ↗

Copy files into [`TempDir`].

Source from the content-addressed store, hash-verified

168/// Copy files into [`TempDir`].
169///
170pub trait PathCopy {
171 /// Copy files and directories into the current path from the `source` according to the glob
172 /// `patterns`.
173 ///
174 /// # Examples
175 ///
176 /// ```rust
177 /// use assert_fs::prelude::*;
178 ///
179 /// let temp = assert_fs::TempDir::new().unwrap();
180 /// temp.copy_from(".", &["*.rs"]).unwrap();
181 /// temp.close().unwrap();
182 /// ```
183 fn copy_from<P, S>(&self, source: P, patterns: &[S]) -> Result<(), FixtureError>
184 where
185 P: AsRef<path::Path>,
186 S: AsRef<str>;
187}
188
189impl PathCopy for TempDir {
190 fn copy_from<P, S>(&self, source: P, patterns: &[S]) -> Result<(), FixtureError>

Callers

nothing calls this directly

Implementers 1

tools.rssrc/fixture/tools.rs

Calls

no outgoing calls

Tested by

no test coverage detected