Class FileTreeDataViews


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> com.swoval.files.DirectoryDataView<T> cached​(java.nio.file.Path path, FileTreeDataViews.Converter<T> converter, int depth, boolean followLinks)
      Make a new DirectoryView that caches the file tree but has no data value associated with each value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • cached

        public static <T> com.swoval.files.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.