MCPcopy Create free account
hub / github.com/argumentcomputer/ix / open

Method open

crates/ffi/src/kernel.rs:139–147  ·  view source on GitHub ↗

Truncate-create the file at `path`, write the comment header (`# env`, `# seeds`), and return a handle ready to record per-failure entries.

(path: &str, env_path: &str, seeds: usize)

Source from the content-addressed store, hash-verified

137 /// Truncate-create the file at `path`, write the comment header (`# env`,
138 /// `# seeds`), and return a handle ready to record per-failure entries.
139 fn open(path: &str, env_path: &str, seeds: usize) -> std::io::Result<Self> {
140 let mut file = File::create(path)?;
141 writeln!(file, "# ix check failures")?;
142 writeln!(file, "# env: {env_path}")?;
143 writeln!(file, "# seeds: {seeds}")?;
144 writeln!(file)?;
145 file.flush()?;
146 Ok(Self { writer: Mutex::new(file), count: AtomicUsize::new(0) })
147 }
148
149 /// Append a single failure record. `name_pretty` is the dot-separated form
150 /// of the constant; `msg` is the raw error string (newlines collapsed to

Callers

nothing calls this directly

Calls 1

flushMethod · 0.80

Tested by

no test coverage detected