Toolshed.Misc (toolshed v0.2.23) View Source
Miscellaneous helpers
Link to this section Summary
Functions
Exit the current IEx session
Load an Erlang term from the filesystem.
Save an Erlang term to the filesystem for easy loading later
Save a value to a file as Elixir terms
Link to this section Functions
Exit the current IEx session
Load an Erlang term from the filesystem.
Examples
#
iex> save_term!({:some_interesting_atom, ["some", "list"]}, "/root/some_atom.term")
{:some_interesting_atom, ["some", "list"]}
iex> load_term!("/root/some_atom.term")
{:some_interesting_atom, ["some", "list"]}
Specs
Save an Erlang term to the filesystem for easy loading later
This function returns the value
passed in to allow easy piping.
Examples
#
iex> :sys.get_state(MyServer) |> save_term!("/root/my_server.term")
# Reboot board
iex> :sys.replace_state(&load_term!("/root/my_server.term"))
Save a value to a file as Elixir terms
Examples
# Save the contents of SystemRegistry to a file
iex> SystemRegistry.match(:_) |> save_value("/root/sr.txt")
:ok