Function spooled_tempfile_in

Source
pub fn spooled_tempfile_in<P: AsRef<Path>>(
    max_size: usize,
    dir: P,
) -> SpooledTempFile 
Expand description

Construct a new SpooledTempFile, backed by a file in the specified directory. Use this when, e.g., you need the temporary file to be backed by a specific filesystem (e.g., when your default temporary directory is in-memory). Also see spooled_tempfile.

NOTE: The specified path isn’t checked until the temporary file is “rolled over” into a real temporary file. If the specified directory isn’t writable, writes to the temporary file will fail once the max_size is reached.