trait WatchService extends AnyRef
A service that will monitor the file system for file creation, deletion and modification.
- Alphabetic
- By Inheritance
- WatchService
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def close(): Unit
Closes this
WatchService
. - abstract def init(): Unit
Initializes the watchservice.
- abstract def poll(timeout: Duration): WatchKey
Retrieves the next
WatchKey
that has aWatchEvent
waiting.Retrieves the next
WatchKey
that has aWatchEvent
waiting. Waits until thetimeout
is expired is no such key exists.- timeout
Maximum time to wait
- returns
The next
WatchKey
that received an event, or null if no such key exists.
- abstract def pollEvents(): Map[WatchKey, Seq[WatchEvent[Path]]]
Retrieves all the events and groups them by watch key.
Retrieves all the events and groups them by watch key. Does not wait if no event is available.
- returns
The pending events.
- abstract def register(path: Path, events: Kind[Path]*): WatchKey
Registers a path to be monitored.
Registers a path to be monitored.
- path
The path to monitor.
- events
The events that should be registered.
- returns
A
WatchKey
, that represents a token of registration.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.CloneNotSupportedException])
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.InterruptedException])