fs2.io

package fs2.io

Type members

Classlikes

@native @JSType
trait Duplex extends Object with Readable with Writable

A facade for Node.js stream.Duplex. Extend or cast to/from your own bindings.

A facade for Node.js stream.Duplex. Extend or cast to/from your own bindings.

See also
object IOException
@native @JSType
trait Readable extends Object

A facade for Node.js stream.Readable. Extend or cast to/from your own bindings.

A facade for Node.js stream.Readable. Extend or cast to/from your own bindings.

See also
final class StreamDestroyedException extends IOException
@native @JSType
trait Writable extends Object

A facade for Node.js stream.Writable. Extend or cast to/from your own bindings.

A facade for Node.js stream.Writable. Extend or cast to/from your own bindings.

See also

Types

type IOException = IOException

Value members

Concrete methods

def readInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean)(implicit F: Sync[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.

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 stdin[F[_]](bufSize: Int)(implicit evidence$1: Sync[F]): Stream[F, Byte]

Stream of bytes read asynchronously from standard input.

Stream of bytes read asynchronously from standard input.

def stdinUtf8[F[_]](bufSize: Int)(implicit evidence$5: Sync[F]): Stream[F, String]

Stream of String read asynchronously from standard input decoded in UTF-8.

Stream of String read asynchronously from standard input decoded in UTF-8.

def stdout[F[_]](implicit evidence$2: Sync[F]): (F, Byte) => INothing

Pipe of bytes that writes emitted values to standard output asynchronously.

Pipe of bytes that writes emitted values to standard output asynchronously.

def stdoutLines[F[_], O](charset: Charset)(implicit evidence$3: Sync[F], evidence$4: Show[O]): (F, O) => INothing

Writes this stream to standard output asynchronously, converting each element to a sequence of bytes via Show and the given Charset.

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 unsafeReadInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean)(implicit F: Sync[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.

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.

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[_]](fos: F[OutputStream], closeAfterUse: Boolean)(implicit F: Sync[F]): (F, Byte) => INothing

Writes all bytes to the specified OutputStream. Set closeAfterUse to false if the OutputStream should not be closed after use.

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.

Inherited methods

def readReadable[F[_]](readable: F[Readable], destroyIfNotEnded: Boolean, destroyIfCanceled: Boolean)(implicit F: Async[F]): Stream[F, Byte]
Inherited from
ioplatform
def readWritable[F[_]](f: Writable => F[Unit])(implicit evidence$2: Async[F]): Stream[F, Byte]
Inherited from
ioplatform
def toDuplexAndRead[F[_]](f: Duplex => F[Unit])(implicit evidence$3: Async[F]): (F, Byte) => Byte
Inherited from
ioplatform
def toReadable[F[_]](implicit F: Async[F]): (F, Byte) => Readable
Inherited from
ioplatform
def toReadableResource[F[_]](s: Stream[F, Byte])(implicit evidence$1: Async[F]): Resource[F, Readable]
Inherited from
ioplatform
def writeWritable[F[_]](writable: F[Writable], endAfterUse: Boolean)(implicit F: Async[F]): (F, Byte) => INothing
Inherited from
ioplatform