Resource

object Resource
Companion:
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def newResource[R](resource: R, onInit: R => Unit, onClose: R => Unit): Resource[R]

Create a new Resource from an AutoClosable object

Create a new Resource from an AutoClosable object

def newTempFile(name: String, suffix: String, dir: String): Resource[File]

Create a resource for a temporary file, which will be deleted after closing the resource

Create a resource for a temporary file, which will be deleted after closing the resource