Skip to main content

safe_read_to_string

Function safe_read_to_string 

Source
pub fn safe_read_to_string(path: &str) -> Result<(PathBuf, String)>
Expand description

Validate path and read file contents in one atomic step. Prevents path traversal by combining validation with the read operation.