Interface FileTreeRepository<T>

    • Method Detail

      • register

        Either<java.io.IOException,​java.lang.Boolean> register​(java.nio.file.Path path,
                                                                     int maxDepth)
        Register a path with the cache. A successful call to this method will both start monitoring of the path add will fill the cache for this path.
        Specified by:
        register in interface PathWatcher<T>
        Parameters:
        path - the directory to watch for file events and to add to the cache
        maxDepth - the maximum maxDepth of subdirectories to watch
        Returns:
        an Either that will return a right value when no exception is thrown. The right value will be true if the path has not been previously registered. The Either will be a left if any IOException is thrown attempting to register the path.