Class FileTree

  • Direct Known Subclasses:
    Bndruns, Bundles

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

      Fields 
      Modifier and Type Field Description
      private FileTree fileTree  
    • 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.
      void setExclude​(java.lang.String exclude)
      Add an Ant-style glob to the exclude patterns.
      void setInclude​(java.lang.String include)
      Add an Ant-style glob to the include patterns.
      • Methods inherited from class java.lang.Object

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

      • fileTree

        private final FileTree fileTree
    • 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)
                                              throws java.io.IOException
        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.
        Throws:
        java.io.IOException - If an exception occurs.
      • getFiles

        public java.util.List<java.io.File> getFiles​(java.io.File baseDir,
                                                     java.util.List<java.lang.String> defaultIncludes)
                                              throws java.io.IOException
        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.
        Throws:
        java.io.IOException - If an exception occurs.
      • setInclude

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

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