RecursiveFileMonitor

io.methvin.better.files.RecursiveFileMonitor
abstract class RecursiveFileMonitor(val root: File, val fileHasher: Option[FileHasher], val logger: Logger) extends Monitor

An implementation of the better-files File.Monitor interface using directory-watcher.

Attributes

fileHasher

a hasher implementation used to hash files to prevent duplicate events. None to disable hashing.

logger

the logger used by DirectoryWatcher. Useful to see debug output. Defaults to nop logger.

root

the root directory to watch

Graph
Supertypes
trait Monitor
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def close(): Unit

Attributes

Definition Classes
AutoCloseable
override def onCreate(file: File, count: Int): Unit

Attributes

Definition Classes
Monitor
override def onDelete(file: File, count: Int): Unit

Attributes

Definition Classes
Monitor
override def onException(exception: Throwable): Unit

Attributes

Definition Classes
Monitor
override def onModify(file: File, count: Int): Unit

Attributes

Definition Classes
Monitor
override def onUnknownEvent(event: WatchEvent[_]): Unit

Attributes

Definition Classes
Monitor
override def start()(implicit executionContext: ExecutionContext): Unit

Attributes

Definition Classes
Monitor

Inherited methods

def onEvent(eventType: Kind[Path], file: File, count: Int): Unit

Dispatch a StandardWatchEventKind to an appropriate callback Override this if you don't want to manually handle onDelete/onCreate/onModify separately

Dispatch a StandardWatchEventKind to an appropriate callback Override this if you don't want to manually handle onDelete/onCreate/onModify separately

Attributes

Inherited from:
Monitor
def stop(): Unit

Attributes

Inherited from:
Monitor

Concrete fields

val fileHasher: Option[FileHasher]
val logger: Logger
val root: File