locus_filesystem_store (locus v2.3.15)

Copy Markdown View Source

Stores a file in the filesystem without blocking the caller.

Summary

Types

msg()

-type msg() :: {finished, success} | {finished, {error, term()}}.

path()

-type path() :: file:filename_all().

state()

-opaque state()

Functions

code_change/3

-spec code_change(term(), state(), term()) -> {ok, state()}.

handle_call(Call, From, State)

-spec handle_call(term(), {pid(), reference()}, state()) -> {stop, unexpected_call, state()}.

handle_cast(Cast, State)

-spec handle_cast(term(), state()) -> {stop, unexpected_cast, state()}.

handle_info/2

-spec handle_info(term(), state()) -> {stop, normal, state()} | {stop, unexpected_info, state()}.

init/1

-spec init([InitArg, ...]) -> {ok, state()}
              when
                  InitArg :: OwnerPid | Path | Content | ModificationDT,
                  OwnerPid :: pid(),
                  Path :: path(),
                  Content :: iodata(),
                  ModificationDT :: calendar:datetime().

start_link(Path, Content, ModificationDT)

-spec start_link(path(), iodata(), calendar:datetime()) -> {ok, pid()}.

terminate(Reason, State)

-spec terminate(term(), state()) -> ok.