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] = scala.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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  10. 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.

  11. 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.

  12. def finalize(): Unit

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

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

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

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

  17. lazy val log: Logger

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

    Run a build

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

    Makes it easier to walk a file tree

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

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

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

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

    Function to call when something changed on the file system

  24. 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.

  25. val path: Path

    Path to directory to watch

  26. val recursive: Boolean

    Watch sub directories too?

  27. def register(dir: Path): Unit

    Register a particular file or directory to be watched

  28. def registerAll(start: Path): Unit

    Recursively register directories

  29. def run(): Unit

    The main directory watching thread

    The main directory watching thread

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

    Definition Classes
    AnyRef
  31. def toString(): String

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

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

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

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

Inherited from Logger

Inherited from Runnable

Inherited from AnyRef

Inherited from Any

Ungrouped