Trait

com.swoval.files

DirectoryRegistry

Related Doc: package files

Permalink

trait DirectoryRegistry extends Filter[Path] with AutoCloseable

Tracks which directories the user wishes to monitor. This can be used to determine whether or not a path is part of the subtree specified by the set of paths registered by the user.

Linear Supertypes
AutoCloseable, Filter[Path], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DirectoryRegistry
  2. AutoCloseable
  3. Filter
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def accept(t: Path): Boolean

    Permalink

    Accept only some instances of T.

    Accept only some instances of T.

    t

    The instance to filter

    returns

    true if the instance is accepted

    Definition Classes
    Filter
  2. abstract def acceptPrefix(path: Path): Boolean

    Permalink

    Returns true if this path is a prefix of a registered path.

    Returns true if this path is a prefix of a registered path. The intended use case is for the NioPathWatcher which always has the root directory as the base. This is so that we can ensure that if we register a directory that does not yet exist, that we will detect when the directory is created. For example, if we want to monitor '/foo/bar/baz', then we would accept '/foo/bar' as a valid prefix path, but we would not accept '/foo/buzz' as a valid prefix path.

    path

    the path to compare against the registered path

    returns

    true if the path is a prefix of a registered path.

  3. abstract def addDirectory(path: Path, maxDepth: Int): Boolean

    Permalink

    Add the input directory to the list of registered directories.

    Add the input directory to the list of registered directories.

    path

    the directory to register

    maxDepth

    controls how many levels of the children of the path should be monitored

    returns

    true if the directory has not been previously registered before or if the new maxDepth value is greater than the previous value.

  4. abstract def close(): Unit

    Permalink
    Definition Classes
    DirectoryRegistry → AutoCloseable
  5. abstract def maxDepthFor(path: Path): Int

    Permalink

    The maximum depth of children of the path to accept.

    The maximum depth of children of the path to accept.

    path

    the registered path

    returns

    the maximum depth of children if the path has been registered. Otherwise it returns Integer.MIN_VALUE.

  6. abstract def registered(): Map[Path, Integer]

    Permalink

    Returns a map of Path -> maxDepth for each path.

    Returns a map of Path -> maxDepth for each path.

    returns

    a map of Path -> maxDepth for each path.

  7. abstract def removeDirectory(path: Path): Unit

    Permalink

    Remove the path from monitoring.

    Remove the path from monitoring.

    path

    the path to stop monitoring.

Concrete Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

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

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

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

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AutoCloseable

Inherited from Filter[Path]

Inherited from AnyRef

Inherited from Any

Ungrouped