Amarula.Storage.File (amarula v0.1.0)
View SourceFilesystem Amarula.Storage adapter — the default plugin.
Isolates each connection by its profile in a subfolder under a configured root:
<root>/<profile>/<prefix><base64url(key)>.termwhere <prefix> is fixed per namespace (creds/session-/sender-key-/
lidmap-/devices-). Values are :erlang.term_to_binary/1 — lossless for
Elixir terms (the creds/record maps hold atom keys and raw binaries), so the
file is Elixir-specific, not interchangeable with Baileys' JSON state.
Writes are atomic (temp file + rename) so a crash mid-write can't corrupt state. A corrupt or unreadable entry is logged and treated as a miss, matching the prior stores' fail-soft behaviour.
Options
:root— the base directory holding one subfolder per connection profile (required).