Package aQute.lib.io

Class FileTree


  • public class FileTree
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      FileTree()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addExcludes​(java.lang.String... excludes)
      Add an Ant-style glob to the exclude patterns.
      void addExcludes​(java.util.List<java.lang.String> excludes)
      Add an Ant-style glob to the exclude patterns.
      void addFile​(java.io.File file)
      Can be used to add specific files to the return value of getFiles(File, String...) and getFiles(File, List).
      void addIncludes​(java.lang.String... includes)
      Add an Ant-style glob to the include patterns.
      void addIncludes​(java.util.List<java.lang.String> includes)
      Add an Ant-style glob to the include patterns.
      java.util.List<java.io.File> getFiles​(java.io.File baseDir, java.lang.String... defaultIncludes)
      Return a list of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.
      java.util.List<java.io.File> getFiles​(java.io.File baseDir, java.util.List<java.lang.String> defaultIncludes)
      Return a list of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.
      java.util.stream.Stream<java.io.File> stream​(java.io.File baseDir, java.lang.String... defaultIncludes)
      Return a stream of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.
      java.util.stream.Stream<java.io.File> stream​(java.io.File baseDir, java.util.List<java.lang.String> defaultIncludes)
      Return a stream of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FileTree

        public FileTree()
    • Method Detail

      • addIncludes

        public void addIncludes​(java.util.List<java.lang.String> includes)
        Add an Ant-style glob to the include patterns.
        Parameters:
        includes - Add an Ant-style glob
      • addIncludes

        public void addIncludes​(java.lang.String... includes)
        Add an Ant-style glob to the include patterns.
        Parameters:
        includes - Add an Ant-style glob
      • addExcludes

        public void addExcludes​(java.lang.String... excludes)
        Add an Ant-style glob to the exclude patterns.
        Parameters:
        excludes - Add an Ant-style glob
      • addExcludes

        public void addExcludes​(java.util.List<java.lang.String> excludes)
        Add an Ant-style glob to the exclude patterns.
        Parameters:
        excludes - Add an Ant-style glob
      • getFiles

        public java.util.List<java.io.File> getFiles​(java.io.File baseDir,
                                                     java.lang.String... defaultIncludes)
        Return a list of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.
        Parameters:
        baseDir - The base directory for locating files.
        defaultIncludes - The default include patterns to use if no include patterns were configured.
        Returns:
        A list of files.
      • getFiles

        public java.util.List<java.io.File> getFiles​(java.io.File baseDir,
                                                     java.util.List<java.lang.String> defaultIncludes)
        Return a list of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.
        Parameters:
        baseDir - The base directory for locating files.
        defaultIncludes - The default include patterns to use if no include patterns were configured.
        Returns:
        A list of files.
      • stream

        public java.util.stream.Stream<java.io.File> stream​(java.io.File baseDir,
                                                            java.lang.String... defaultIncludes)
        Return a stream of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.
        Parameters:
        baseDir - The base directory for locating files.
        defaultIncludes - The default include patterns to use if no include patterns were configured.
        Returns:
        A stream of files.
      • stream

        public java.util.stream.Stream<java.io.File> stream​(java.io.File baseDir,
                                                            java.util.List<java.lang.String> defaultIncludes)
        Return a stream of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.
        Parameters:
        baseDir - The base directory for locating files.
        defaultIncludes - The default include patterns to use if no include patterns were configured.
        Returns:
        A stream of files.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object