Minga.Extension.Storage (minga_sdk v0.1.0)

Copy Markdown View Source

Sanctioned per-extension persistent storage.

Each extension gets a private data directory plus atomic read/write helpers for durable state.

This is a compile-time stub. At runtime, the real module in Minga's BEAM VM provides the implementation.

Summary

Functions

data_dir(name)

@spec data_dir(atom()) :: String.t()

read(name, rel)

@spec read(atom(), Path.t()) ::
  {:ok, binary()} | {:error, File.posix() | :invalid_path}

write(name, rel, contents)

@spec write(atom(), Path.t(), iodata()) ::
  :ok | {:error, File.posix() | :invalid_path}