Skip to main content

Module io

Module io 

Source

Functionsยง

create_dir_all
file_exists
has_matching_version
Look for a # version: N line near the top of a cache file and return true if it parses to exactly expected. Older caches without the line, caches with a newer/older N, and malformed lines all return false so the caller can silently regenerate. Stops scanning at the first non-comment line to keep the cost bounded.
is_dir
list_directory
Plain readdir returning names (excluding . and ..). Order undefined.
read_file
write_file_if_changed
Returns true if the file was written, false if it was already byte-identical.