Skip to main content

Module file

Module file 

Source
Expand description

Async file I/O helpers for large payloads.

Email attachments can be arbitrarily large, so file reads and writes go through async, chunked helpers here to avoid blocking the Tokio runtime. Also includes random-file generation for test fixtures.

Functionsยง

generate_random_bytes
Generates random bytes that can be used to test the file system.
generate_random_file
Generates a random file with the given size in MB.
read_large_file
Reads a large file from the given path.