Raxol.Terminal.Config.Persistence (Raxol v0.2.0)
View SourceHandles loading and saving terminal configuration.
Provides functions for persisting configuration to disk and loading it back.
Summary
Functions
Loads terminal configuration from the default path.
Loads terminal configuration from the specified path.
Parses configuration from JSON string.
Saves terminal configuration to the default path.
Saves terminal configuration to the specified path.
Functions
Loads terminal configuration from the default path.
If the configuration file doesn't exist, returns the default configuration.
Returns
{:ok, config}
or {:error, reason}
Loads terminal configuration from the specified path.
If the configuration file doesn't exist, returns the default configuration.
Parameters
path
- The file path to load from
Returns
{:ok, config}
or {:error, reason}
Parses configuration from JSON string.
Parameters
json
- The JSON string to parse
Returns
{:ok, config}
or {:error, reason}
Saves terminal configuration to the default path.
Parameters
config
- The configuration to save
Returns
:ok
or {:error, reason}
Saves terminal configuration to the specified path.
Parameters
config
- The configuration to savepath
- The file path to save to
Returns
:ok
or {:error, reason}