pinchpi_fs behaviour (pinchpi v0.1.0)

Summary

Callbacks

is_dir/2

-callback is_dir(binary(), map()) -> boolean().

is_regular/2

-callback is_regular(binary(), map()) -> boolean().

list_dir/2

-callback list_dir(binary(), map()) -> {ok, [binary()]} | {error, term()}.

read_file/2

-callback read_file(binary(), map()) -> {ok, binary()} | {error, term()}.

Functions

is_dir(Mod, Path, Opts)

-spec is_dir(module(), binary(), map()) -> boolean().

is_regular(Mod, Path, Opts)

-spec is_regular(module(), binary(), map()) -> boolean().

read_file(Mod, Path, Opts)

-spec read_file(module(), binary(), map()) -> {ok, binary()} | {error, term()}.