Interface DirectoryView

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getMaxDepth()
      Returns the maximum depth of children of subdirectories to include below the path specified by getTypedPath().
      java.nio.file.Path getPath()
      Return the path of the root directory.
      TypedPath getTypedPath()
      Return the typed path of the root directory.
      java.util.List<TypedPath> list​(int maxDepth, Filter<? super TypedPath> filter)
      List all of the files in the root directory, returning only those files that are accepted by the provided filter.
      • Methods inherited from interface java.lang.AutoCloseable

        close
    • Method Detail

      • getPath

        java.nio.file.Path getPath()
        Return the path of the root directory.
        Returns:
        the path of the root directory.
      • getTypedPath

        TypedPath getTypedPath()
        Return the typed path of the root directory.
        Returns:
        the typed path of the root directory.
      • list

        java.util.List<TypedPath> list​(int maxDepth,
                                       Filter<? super TypedPath> filter)
                                throws java.io.IOException
        List all of the files in the root directory, returning only those files that are accepted by the provided filter.
        Parameters:
        maxDepth - the maximum depth of subdirectories to query
        filter - include only paths accepted by the filter
        Returns:
        a List of Path instances accepted by the filter.
        Throws:
        java.io.IOException - if there is an error listing the directory.
      • getMaxDepth

        int getMaxDepth()
        Returns the maximum depth of children of subdirectories to include below the path specified by getTypedPath(). For example, when the value is -1, then the DirectoryView should include only itself. When the value is 0, it should include all of the subdirectories and files in the path. When the value is 1, it should include all of the subdirectories and files in the path and all of the subdirectories and files in the immediate subdirectories of the path, but not the children of these nested subdirectories. When the value is Integer.MAX_VALUE, all children of the path are included.
        Returns:
        the maximum depth of subdirectory children to include.