-spec term_to_file(file:filename(),
term()) -> boolean().
Save an Erlang term to a file with binary_to_term encoding.
The file’s mtime is not updated if its contents are not changed.
Return true if the contents of the file have changed or the file didn’t exist.
This function automatically creates parent directories.