mirror of
https://github.com/benbusby/farside.git
synced 2025-06-08 10:26:36 +00:00
config option update_file now contains updated json of working instances after sync
This commit is contained in:
parent
a6e0c34abe
commit
ca1e96470d
5 changed files with 22 additions and 9 deletions
|
@ -92,4 +92,17 @@ defmodule Farside do
|
|||
instance
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def save_results(file, data) do
|
||||
{:ok, file} = File.open(file, [:append])
|
||||
bin = :erlang.term_to_binary(data)
|
||||
IO.binwrite(file, bin)
|
||||
File.close(file)
|
||||
end
|
||||
|
||||
def restore_term(file) do
|
||||
{:ok,bin} = File.read(file)
|
||||
:erlang.binary_to_term(bin)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue