WatchServiceAdapter

sbt.io.WatchService.WatchServiceAdapter
final implicit class WatchServiceAdapter(service: WatchService) extends WatchService

Adapts a Java WatchService to be used with sbt's WatchService infrastructure.

Value parameters

service

The WatchService to use.

Attributes

Graph
Supertypes
trait WatchService
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def close(): Unit

Closes this WatchService.

Closes this WatchService.

Attributes

Definition Classes
override def init(): Unit

Initializes the watchservice.

Initializes the watchservice.

Attributes

Definition Classes
override def poll(timeout: Duration): WatchKey

Retrieves the next WatchKey that has a WatchEvent waiting. Waits until the timeout is expired is no such key exists.

Retrieves the next WatchKey that has a WatchEvent waiting. Waits until the timeout is expired is no such key exists.

Value parameters

timeout

Maximum time to wait

Attributes

Returns

The next WatchKey that received an event, or null if no such key exists.

Definition Classes
override def pollEvents(): Map[WatchKey, Seq[WatchEvent[Path]]]

Retrieves all the events and groups them by watch key. Does not wait if no event is available.

Retrieves all the events and groups them by watch key. Does not wait if no event is available.

Attributes

Returns

The pending events.

Definition Classes
override def register(path: Path, events: Kind[Path]*): WatchKey

Registers a path to be monitored.

Registers a path to be monitored.

Value parameters

events

The events that should be registered.

path

The path to monitor.

Attributes

Returns

A WatchKey, that represents a token of registration.

Definition Classes
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
override def unregister(path: Path): Unit

Unregisters a monitored path.

Unregisters a monitored path.

Value parameters

path

The monitored path.

Attributes

Definition Classes
Unregisterable