Class FileTreeDataViews


  • public class FileTreeDataViews
    extends java.lang.Object
    Provides functional interfaces for processing and managing instances of FileTreeDataView.
    • Method Detail

      • cached

        public static <T> DirectoryDataView<T> cached​(java.nio.file.Path path,
                                                      FileTreeDataViews.Converter<T> converter,
                                                      int depth,
                                                      boolean followLinks)
                                               throws java.io.IOException
        Make a new DirectoryView that caches the file tree but has no data value associated with each value.
        Type Parameters:
        T - the data type for this view
        Parameters:
        path - the path to monitor
        converter - computes the data value for each path found in the directory
        depth - sets how the limit for how deep to traverse the children of this directory
        followLinks - sets whether or not to treat symbolic links whose targets as directories or files
        Returns:
        a directory whose entries just contain the path itself.
        Throws:
        java.io.IOException - when an error is encountered traversing the directory.