fs2.io

package fs2.io

Type members

Classlikes

sealed abstract class Watcher[F <: ([_$1] =>> Any)]
Allows watching the file system for changes to directories and files by using the platform's WatchService.
Companion
object
object Watcher
Companion
class

Value members

Methods

def readInputStream[F <: ([_$1] =>> Any)](fis: F[InputStream], chunkSize: Int, blocker: Blocker, closeAfterUse: Boolean)(F: Sync[F], cs: ContextShift[F]): Stream[F, Byte]
Reads all bytes from the specified InputStream with a buffer size of chunkSize.
Set closeAfterUse to false if the InputStream should not be closed after use.
def readOutputStream[F <: ([_$6] =>> Any)](blocker: Blocker, chunkSize: Int)(f: OutputStream => F[Unit])(evidence$1: Concurrent[F], evidence$2: ContextShift[F]): Stream[F, Byte]
Take a function that emits to an OutputStream effectfully,
and return a stream which, when run, will perform that function and emit
the bytes recorded in the OutputStream as an fs2.Stream
The stream produced by this will terminate if:
- f returns
- f calls OutputStream#close
If none of those happens, the stream will run forever.
def stdin[F <: ([_$7] =>> Any)](bufSize: Int, blocker: Blocker)(evidence$3: Sync[F], evidence$4: ContextShift[F]): Stream[F, Byte]
Stream of bytes read asynchronously from standard input.
def stdinUtf8[F <: ([_$12] =>> Any)](bufSize: Int, blocker: Blocker)(evidence$10: Sync[F], evidence$11: ContextShift[F]): Stream[F, String]
Stream of String read asynchronously from standard input decoded in UTF-8.
def stdout[F <: ([_$8] =>> Any)](blocker: Blocker)(evidence$5: Sync[F], evidence$6: ContextShift[F]): (F, Byte) => Unit
Pipe of bytes that writes emitted values to standard output asynchronously.
def stdoutLines[F <: ([_$9] =>> Any), O](blocker: Blocker, charset: Charset)(evidence$7: Sync[F], evidence$8: ContextShift[F], evidence$9: Show[O]): (F, O) => Unit
Writes this stream to standard output asynchronously, converting each element to
a sequence of bytes via Show and the given Charset.
Each write operation is performed on the supplied execution context. Writes are
blocking so the execution context should be configured appropriately.
def toInputStream[F <: ([_$13] =>> Any)](F: ConcurrentEffect[F]): (F, Byte) => InputStream
Pipe that converts a stream of bytes to a stream that will emit a single java.io.InputStream,
that is closed whenever the resulting stream terminates.
If the close of resulting input stream is invoked manually, then this will await until the
original stream completely terminates.
Because all InputStream methods block (including close), the resulting InputStream
should be consumed on a different thread pool than the one that is backing the ConcurrentEffect.
Note that the implementation is not thread safe -- only one thread is allowed at any time
to operate on the resulting java.io.InputStream.
def toInputStreamResource[F <: ([_$14] =>> Any)](source: Stream[F, Byte])(F: ConcurrentEffect[F]): Resource[F, InputStream]
Like toInputStream but returns a Resource rather than a single element stream.
def unsafeReadInputStream[F <: ([_$2] =>> Any)](fis: F[InputStream], chunkSize: Int, blocker: Blocker, closeAfterUse: Boolean)(F: Sync[F], cs: ContextShift[F]): Stream[F, Byte]
Reads all bytes from the specified InputStream with a buffer size of chunkSize.
Set closeAfterUse to false if the InputStream should not be closed after use.
Each read operation is performed on the supplied blocker.
Recycles an underlying input buffer for performance. It is safe to call
this as long as whatever consumes this Stream does not store the Chunk
returned or pipe it to a combinator that does (e.g. buffer). Use
readInputStream for a safe version.
def writeOutputStream[F <: ([_$5] =>> Any)](fos: F[OutputStream], blocker: Blocker, closeAfterUse: Boolean)(F: Sync[F], cs: ContextShift[F]): (F, Byte) => Unit
Writes all bytes to the specified OutputStream. Set closeAfterUse to false if
the OutputStream should not be closed after use.
Each write operation is performed on the supplied execution context. Writes are
blocking so the execution context should be configured appropriately.