Raxol.Core.Preferences.Persistence (Raxol v0.2.0)
View SourceHandles persistence (loading/saving) of user preferences to a file.
Summary
Functions
Loads user preferences from the designated file.
Returns the full path to the user preferences file. Uses an application-specific directory.
Saves the given preferences map to the designated file.
Functions
Loads user preferences from the designated file.
Returns:
{:ok, preferences_map}if successful.{:error, :file_not_found}if the file doesn't exist.{:error, reason}for other file or decoding errors.
Returns the full path to the user preferences file. Uses an application-specific directory.
Saves the given preferences map to the designated file.
Serializes the map using :erlang.term_to_binary.
Returns:
:okon success.{:error, reason}on failure.