View Source locus_filesystem_store (locus v2.3.7)

Stores a file in the filesystem without blocking the caller

Link to this section Summary

Link to this section Types

Specs

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

Specs

path() :: nonempty_string().

Specs

state() :: #state{}.

Link to this section Functions

Link to this function

code_change(OldVsn, State, Extra)

View Source

Specs

code_change(term(), state(), term()) -> {ok, state()}.
Link to this function

handle_call(Call, From, State)

View Source

Specs

handle_call(term(), {pid(), reference()}, state()) -> {stop, unexpected_call, state()}.
Link to this function

handle_cast(Cast, State)

View Source

Specs

handle_cast(term(), state()) -> {stop, unexpected_cast, state()}.
Link to this function

handle_info(Info, State)

View Source

Specs

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

Specs

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

start_link(Path, Content, ModificationDT)

View Source

Specs

start_link(path(), iodata(), calendar:datetime()) -> {ok, pid()}.
Link to this function

terminate(Reason, State)

View Source

Specs

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