org.mashupbots.socko.buildtools

DirectoryWatcher

class DirectoryWatcher extends Runnable with Logger

Watches a directory for changes and triggers a build

Thanks to Chris Eberle. Also see java tutorial

Linear Supertypes
Logger, Runnable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DirectoryWatcher
  2. Logger
  3. Runnable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DirectoryWatcher(path: Path, recursive: Boolean, onEvent: (List[WatchEvent[_]]) ⇒ Unit, onPoll: Option[() ⇒ Boolean] = None, eventDelayTimeout: Int = 100, eventPollTimeout: Int = 10000)

    path

    Path to directory to watch

    recursive

    Watch sub directories too?

    onEvent

    Function to call when something changed on the file system

    onPoll

    Optional function to call after every eventPollTimeout and there are no events to process. If the function returns true, polling continues. If false is returned, polling is terminated and the thread is stopped.

    eventDelayTimeout

    Milliseconds to wait after an event for more events. onEvent will only be called after this delay has expired and there are no more events.

    eventPollTimeout

    Milliseconds to wait for an event. If no events have been raised, onPoll() is called if it has been supplied.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. val eventDelayTimeout: Int

    Milliseconds to wait after an event for more events.

    Milliseconds to wait after an event for more events. onEvent will only be called after this delay has expired and there are no more events.

  9. val eventPollTimeout: Int

    Milliseconds to wait for an event.

    Milliseconds to wait for an event. If no events have been raised, onPoll() is called if it has been supplied.

  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. val keys: HashMap[WatchKey, Path]

  15. lazy val log: Logger

    Logger name is inferred from the class name.

    Logger name is inferred from the class name.

    Definition Classes
    Logger
  16. def logEvent(event: WatchEvent[_]): Unit

    Run a build

  17. implicit def makeDirVisitor(f: (Path) ⇒ Unit): SimpleFileVisitor[Path]

    Makes it easier to walk a file tree

  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. val onEvent: (List[WatchEvent[_]]) ⇒ Unit

    Function to call when something changed on the file system

  22. val onPoll: Option[() ⇒ Boolean]

    Optional function to call after every eventPollTimeout and there are no events to process.

    Optional function to call after every eventPollTimeout and there are no events to process. If the function returns true, polling continues. If false is returned, polling is terminated and the thread is stopped.

  23. val path: Path

    Path to directory to watch

  24. val recursive: Boolean

    Watch sub directories too?

  25. def register(dir: Path): Unit

    Register a particular file or directory to be watched

  26. def registerAll(start: Path): Unit

    Recursively register directories

  27. def run(): Unit

    The main directory watching thread

    The main directory watching thread

    Definition Classes
    DirectoryWatcher → Runnable
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. val watchService: WatchService

Inherited from Logger

Inherited from Runnable

Inherited from AnyRef

Inherited from Any

Ungrouped