Accept only some instances of T
.
Accept only some instances of T
.
The instance to filter
true if the instance is accepted
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.
the path to compare against the registered path
true if the path is a prefix of a registered path.
Add the input directory to the list of registered directories.
Add the input directory to the list of registered directories.
the directory to register
controls how many levels of the children of the path should be monitored
true if the directory has not been previously registered before or if the new maxDepth value is greater than the previous value.
The maximum depth of children of the path to accept.
The maximum depth of children of the path to accept.
the registered path
the maximum depth of children if the path has been registered. Otherwise it returns Integer.MIN_VALUE.
Returns a map of Path -> maxDepth for each path.
Returns a map of Path -> maxDepth for each path.
a map of Path -> maxDepth for each path.
Remove the path from monitoring.
Remove the path from monitoring.
the path to stop monitoring.
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.