save_temp_file

Function save_temp_file 

Source
pub fn save_temp_file(prefix: &str, bytes: &[u8]) -> Result<PathBuf>
Expand description

Minimal file management helpers for multimodal flows.

  • save_temp_file: write bytes to a temp file and return the path
  • read_file: read bytes from a path
  • remove_file: delete a file
  • guess_mime_from_path: lightweight MIME guesser based on extension
  • validate_file: validate file exists and is readable
  • get_file_size: get file size in bytes
  • create_temp_dir: create a temporary directory Save bytes to a temporary file with a given prefix