diff options
Diffstat (limited to 'shard/lib/app/file.ex')
-rw-r--r-- | shard/lib/app/file.ex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/shard/lib/app/file.ex b/shard/lib/app/file.ex index ce28beb..e2a9798 100644 --- a/shard/lib/app/file.ex +++ b/shard/lib/app/file.ex @@ -84,6 +84,12 @@ defmodule SApp.File do {:reply, state.manifest, state} end + def handle_call(:delete_shard, _from, state) do + GenServer.call(state.store, :delete_store) + File.rm(state.path) + {:stop, :normal, :ok, state} + end + def handle_call(:get_info, _from, state) do reply = cond do state.info != nil and GenServer.call(state.store, {:have_rec, state.info.merkle_root}) -> |