FileStore.Adapters.Disk (file_store v0.2.1)
Stores files on the local disk. This is primarily intended for development.
Configuration
storage_path
- The path on disk where files are stored. This option is required.base_url
- The base URL that should be used for generating URLs to your files.
Example
iex> store = FileStore.new(
...> adapter: FileStore.Adapters.Disk,
...> storage_path: "/path/to/store/files",
...> base_url: "http://example.com/files/"
...> )
%FileStore{...}
iex> FileStore.write(store, "foo", "hello world")
:ok
iex> FileStore.read(store, "foo")
{:ok, "hello world"}
Link to this section Summary
Functions
Get an the path for a given key.
Link to this section Functions
Link to this function
join(store, key)
Specs
join(FileStore.t(), binary()) :: Path.t()
Get an the path for a given key.