MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / open_agent_log

Method open_agent_log

src/context/tsk_env.rs:125–132  ·  view source on GitHub ↗

Open (or create) the agent.log file for a task in append mode. Creates the output directory if it doesn't exist.

(&self, task_id: &str)

Source from the content-addressed store, hash-verified

123 ///
124 /// Creates the output directory if it doesn't exist.
125 pub fn open_agent_log(&self, task_id: &str) -> Result<std::fs::File, std::io::Error> {
126 let output_dir = self.task_dir(task_id).join("output");
127 std::fs::create_dir_all(&output_dir)?;
128 std::fs::OpenOptions::new()
129 .create(true)
130 .append(true)
131 .open(output_dir.join("agent.log"))
132 }
133
134 /// Get the directory for per-proxy configuration files (e.g., squid.conf)
135 pub fn proxy_config_dir(&self, fingerprint: &str) -> PathBuf {

Callers 2

run_in_containerMethod · 0.80
run_container_innerMethod · 0.80

Calls 1

task_dirMethod · 0.80

Tested by

no test coverage detected