Interface FileTreeDataView<T>

  • Type Parameters:
    T - the data value for each path
    All Superinterfaces:
    java.lang.AutoCloseable, FileTreeView
    All Known Subinterfaces:
    FileTreeRepository<T>

    public interface FileTreeDataView<T>
    extends FileTreeView, java.lang.AutoCloseable
    A repository for which each Path has an associated data value.
    • Method Detail

      • listEntries

        java.util.List<FileTreeDataViews.Entry<T>> listEntries​(java.nio.file.Path path,
                                                               int maxDepth,
                                                               Filter<? super FileTreeDataViews.Entry<T>> filter)
                                                        throws java.io.IOException
        List all of the files for the path</code> that are accepted by the <code>filter.
        Parameters:
        path - the path to list. If this is a file, returns a list containing the Entry for the file or an empty list if the file is not monitored by the path.
        maxDepth - the maximum depth of subdirectories to return
        filter - include only paths accepted by this
        Returns:
        a List of FileTreeDataViews.Entry instances accepted by the filter. The list will be empty if the path is not a subdirectory of this CachedDirectory or if it is a subdirectory, but the CachedDirectory was created without the recursive flag.
        Throws:
        java.io.IOException - if the path cannot be listed.
      • list

        java.util.List<TypedPath> list​(java.nio.file.Path path,
                                       int maxDepth,
                                       Filter<? super TypedPath> filter)
                                throws java.io.IOException
        List all of the files for the path, returning only those files that are accepted by the provided filter.
        Specified by:
        list in interface FileTreeView
        Parameters:
        path - the root path to list
        maxDepth - the maximum depth of subdirectories to query
        filter - include only paths accepted by the filter
        Returns:
        a List of TypedPath instances accepted by the filter.
        Throws:
        java.io.IOException - if the path cannot be listed.