Module io

Source
Expand description

An extension of the std::io module. Includes functions for safely saving and loading files from any serializable types, along with functions specifically for working with JSON and TOML.

Enums§

FileError
Errors that might occur when saving a file.

Functions§

load_from_json
A generic funtion for loading a type from a JSON file.
load_from_toml
A generic funtion for loading a type from a TOML file.
safe_file_save
Safely save a file with the given contents, replacing the original if necessary.
save_to_json
A generic function for safely saving a serializable type to a JSON file.
save_to_toml
A generic function for safely saving a serializable type to a TOML file.
walk_dir
Attempt to recursively walk the given directory and all its sub-directories.

Type Aliases§

JsonFileError
TomlFileLoadError
TomlFileSaveError