FileStream (file_stream v0.7.0)
A module to stream file-like resources.
Link to this section Summary
Functions
Gets the value for a specific key
within the stream meta.
Puts the given value
under key
of the stream meta.
Resets the stream meta to be empty.
Returns a FileStream
for the given resource.
Link to this section Types
@type t() :: %FileStream{ config: any(), meta: map(), storage: FileStream.Storage.t(), uri: URI.t() }
Link to this section Functions
Link to this function
get_meta(stream, key)
Gets the value for a specific key
within the stream meta.
Link to this function
put_meta(stream, key, value)
Puts the given value
under key
of the stream meta.
Link to this function
reset_meta(stream)
Resets the stream meta to be empty.
Link to this function
stream!(resource, opts \\ [])
@spec stream!( FileStream.Resource.t(), keyword() ) :: t()
Returns a FileStream
for the given resource.
The resource must be any term that implements the FileStream.Resource
protocol.
By default, implementations for String
and URI
are included.