package io
- Alphabetic
- By Inheritance
- io
- ioplatform
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
Type Members
- type ClosedChannelException = java.nio.channels.ClosedChannelException
- Definition Classes
- ioplatform
- type IOException = java.io.IOException
- type InterruptedIOException = java.io.InterruptedIOException
- Definition Classes
- ioplatform
- sealed abstract class Watcher[F[_]] extends AnyRef
Allows watching the file system for changes to directories and files by using the platform's
WatchService.
Value Members
- def readClassLoaderResource[F[_]](name: String, chunkSize: Int = 64 * 1024, classLoader: ClassLoader = getClass().getClassLoader())(implicit F: Sync[F]): Stream[F, Byte]
Stream of bytes read asynchronously from the specified classloader resource.
Stream of bytes read asynchronously from the specified classloader resource.
- Definition Classes
- ioplatform
- See also
readClassResource for a resource relative to a class.
- def readClassResource[F[_], C](name: String, chunkSize: Int = 64 * 1024)(implicit F: Sync[F], ct: ClassTag[C]): Stream[F, Byte]
Stream of bytes read asynchronously from the specified resource relative to the class
C.Stream of bytes read asynchronously from the specified resource relative to the class
C.- Definition Classes
- ioplatform
- See also
readClassLoaderResource for a resource relative to a classloader.
- def readInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean = true)(implicit F: Sync[F]): Stream[F, Byte]
Reads all bytes from the specified
InputStreamwith a buffer size ofchunkSize.Reads all bytes from the specified
InputStreamwith a buffer size ofchunkSize. SetcloseAfterUseto false if theInputStreamshould not be closed after use. - def readOutputStream[F[_]](chunkSize: Int)(f: (OutputStream) => F[Unit])(implicit arg0: Async[F]): Stream[F, Byte]
Take a function that emits to a
java.io.OutputStreameffectfully, and return a stream which, when run, will perform that function and emit the bytes recorded in the OutputStream as an fs2.StreamTake a function that emits to a
java.io.OutputStreameffectfully, and return a stream which, when run, will perform that function and emit the bytes recorded in the OutputStream as an fs2.StreamThe stream produced by this will terminate if:
freturnsfcallsOutputStream#close
If none of those happens, the stream will run forever.
- Definition Classes
- ioplatform
- def stderr[F[_]](implicit arg0: Sync[F]): Pipe[F, Byte, INothing]
Pipe of bytes that writes emitted values to standard error asynchronously.
Pipe of bytes that writes emitted values to standard error asynchronously.
- Definition Classes
- ioplatform
- def stdin[F[_]](bufSize: Int)(implicit arg0: Sync[F]): Stream[F, Byte]
Stream of bytes read asynchronously from standard input.
Stream of bytes read asynchronously from standard input.
- Definition Classes
- ioplatform
- def stdinUtf8[F[_]](bufSize: Int)(implicit arg0: Sync[F]): Stream[F, String]
Stream of
Stringread asynchronously from standard input decoded in UTF-8.Stream of
Stringread asynchronously from standard input decoded in UTF-8.- Definition Classes
- ioplatform
- def stdout[F[_]](implicit arg0: Sync[F]): Pipe[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.
- Definition Classes
- ioplatform
- def stdoutLines[F[_], O](charset: Charset = StandardCharsets.UTF_8)(implicit arg0: Sync[F], arg1: Show[O]): Pipe[F, O, INothing]
Writes this stream to standard output asynchronously, converting each element to a sequence of bytes via
Showand the givenCharset.Writes this stream to standard output asynchronously, converting each element to a sequence of bytes via
Showand the givenCharset.- Definition Classes
- ioplatform
- def toInputStream[F[_]](implicit arg0: Async[F]): Pipe[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.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
closeof resulting input stream is invoked manually, then this will await until the original stream completely terminates.Because all
InputStreammethods block (includingclose), the resultingInputStreamshould be consumed on a different thread pool than the one that is backing the effect.Note that the implementation is not thread safe -- only one thread is allowed at any time to operate on the resulting
java.io.InputStream.- Definition Classes
- ioplatform
- def toInputStreamResource[F[_]](source: Stream[F, Byte])(implicit arg0: Async[F]): Resource[F, InputStream]
Like toInputStream but returns a
Resourcerather than a single element stream.Like toInputStream but returns a
Resourcerather than a single element stream.- Definition Classes
- ioplatform
- def unsafeReadInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean = true)(implicit F: Sync[F]): Stream[F, Byte]
Reads all bytes from the specified
InputStreamwith a buffer size ofchunkSize.Reads all bytes from the specified
InputStreamwith a buffer size ofchunkSize. SetcloseAfterUseto false if theInputStreamshould not be closed after use.Recycles an underlying input buffer for performance. It is safe to call this as long as whatever consumes this
Streamdoes not store theChunkreturned or pipe it to a combinator that does (e.g.buffer). UsereadInputStreamfor a safe version. - def writeOutputStream[F[_]](fos: F[OutputStream], closeAfterUse: Boolean = true)(implicit F: Sync[F]): Pipe[F, Byte, INothing]
Writes all bytes to the specified
OutputStream.Writes all bytes to the specified
OutputStream. SetcloseAfterUseto false if theOutputStreamshould 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.
- object Watcher
- object compression extends compressionplatform