Skip to main content

Module io

Module io 

Source
Expand description

Convenience wrappers around common file I/O operations. Convenience I/O helpers.

These functions wrap common std::fs operations and attach contextual error messages (including the failing path) where appropriate.

Functionsยง

create_dir_all
Create a directory and any missing parent directories.
create_dir_all_std
std::io variant of create_dir_all.
read_to_string
Read a file into a UTF-8 string.
read_to_string_optional
Read a file into a UTF-8 string.
read_to_string_or_default
Read a file into a string, returning an empty string on error.
read_to_string_std
std::io variant of read_to_string().
write
Write bytes to a file.
write_atomic_std
Write bytes to path atomically, best-effort.
write_std
std::io variant of write().