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

Interface FileWriteStr

src/fixture/tools.rs:103–120  ·  view source on GitHub ↗

Write a text file at [`ChildPath`].

Source from the content-addressed store, hash-verified

101/// Write a text file at [`ChildPath`].
102///
103pub trait FileWriteStr {
104 /// Write a text file at [`ChildPath`].
105 ///
106 /// # Examples
107 ///
108 /// ```rust
109 /// use assert_fs::prelude::*;
110 ///
111 /// let temp = assert_fs::TempDir::new().unwrap();
112 /// temp
113 /// .child("foo.txt")
114 /// .write_str("To be or not to be...")
115 /// .unwrap();
116 /// temp.close().unwrap();
117 /// ```
118 ///
119 fn write_str(&self, data: &str) -> Result<(), FixtureError>;
120}
121
122impl FileWriteStr for ChildPath {
123 fn write_str(&self, data: &str) -> Result<(), FixtureError> {

Callers

nothing calls this directly

Implementers 1

tools.rssrc/fixture/tools.rs

Calls

no outgoing calls

Tested by

no test coverage detected