Opens the specified resource.
Opens the specified resource and applies the specified function to its content.
Opens the specified resource and applies the specified function to its content.
The resource will be closed regardless of whether f
fails. Note that f
is expected to be safe - it cannot
throw but should instead wrap all errors in a ProcessResult.
(Since version 0.3.1) Use econtramap instead
(Since version 0.3.1) Use emap instead
Represents a resource that can be opened and worked on.
The purpose of this trait is to abstract over the notion of "things that can be opened", such as files, URLs... Default instances are provided for
java.io
types -java.io.File
, for example, has instances for both opening it for reading and for writing.type of the resource itself (eg
java.io.File
).type of the opened resource (eg
java.io.InputStream
)