IOActions

doobie.util.io.IOActions
class IOActions[M[_]](implicit M: Sync[M])

Constructor for a module of IO operations in some effectful monad. This is by no means complete; contributions welcome. The construtors here expose naked lifetime-managed objects and should be used with caution; they are mostly intended for library authors who wish to integrate vendor- specific behavior that relies on JDK IO.

Attributes

Source
io.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Grouped members

Console Operations

def putStr(s: String): M[Unit]

Print to Console.out

Print to Console.out

Attributes

Source
io.scala
def putStrLn(s: String): M[Unit]

Print to Console.out

Print to Console.out

Attributes

Source
io.scala

File Operations

def copyFileToStream(bufSize: Int, file: File, os: OutputStream): M[Unit]

Copy the contents of file to a os in blocks of size bufSize.

Copy the contents of file to a os in blocks of size bufSize.

Attributes

Source
io.scala
def copyStreamToFile(bufSize: Int, file: File, is: InputStream): M[Unit]

Copy the remainder of is to file in blocks of size bufSize.

Copy the remainder of is to file in blocks of size bufSize.

Attributes

Source
io.scala
def withFileInputStream[A](file: File)(f: FileInputStream => M[A]): M[A]

Perform an operation with a FileInputStream, which will be closed afterward.

Perform an operation with a FileInputStream, which will be closed afterward.

Attributes

Source
io.scala
def withFileOutputStream[A](file: File)(f: FileOutputStream => M[A]): M[A]

Perform an operation with a FileOutputStream, which will be closed afterward.

Perform an operation with a FileOutputStream, which will be closed afterward.

Attributes

Source
io.scala

Stream Operations

def copyBlock(buf: Array[Byte])(is: InputStream, os: OutputStream): M[Int]

Copy a block from is to os using naked buffer buf, which will be clobbered.

Copy a block from is to os using naked buffer buf, which will be clobbered.

Attributes

Source
io.scala
def copyStream(buf: Array[Byte])(is: InputStream, os: OutputStream): M[Unit]

Copy the remainder of is into os using naked buffer buf, which will be clobbered.

Copy the remainder of is into os using naked buffer buf, which will be clobbered.

Attributes

Source
io.scala
def flush(os: OutputStream): M[Unit]

Flush os.

Flush os.

Attributes

Source
io.scala