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

Method path

src/fixture/dir.rs:242–247  ·  view source on GitHub ↗

Accesses the [`Path`] to the temporary directory. [`Path`]: std::path::Path # Examples ``` use assert_fs::fixture::TempDir; let tmp_dir = TempDir::new().unwrap(); println!("{}", tmp_dir.path().display()); tmp_dir.close().unwrap(); ```

(&self)

Source from the content-addressed store, hash-verified

240 /// tmp_dir.close().unwrap();
241 /// ```
242 pub fn path(&self) -> &path::Path {
243 match self.temp {
244 Inner::Temp(ref temp) => temp.path(),
245 Inner::Persisted(ref path) => path.as_path(),
246 }
247 }
248
249 /// Closes and removes the temporary directory, returning a `Result`.
250 ///

Callers 12

assertMethod · 0.45
create_dir_allMethod · 0.45
touchMethod · 0.45
write_binaryMethod · 0.45
write_strMethod · 0.45
write_fileMethod · 0.45
copy_fromMethod · 0.45
symlink_to_fileMethod · 0.45
symlink_to_dirMethod · 0.45
copy_filesFunction · 0.45
as_refMethod · 0.45
derefMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected