## org.apache.maven.shared.model.fileset.util
Class FileSetManager

    java.lang.Object
      org.apache.maven.shared.model.fileset.util.FileSetManager

    public class FileSetManager

extends java.lang.Object

Provides operations for use with FileSet instances, such as retrieving the included/excluded files, deleting all matching entries, etc.

Version:
  $Id: FileSetManager.java 694312 2008-09-11 15:46:15Z bentmann $
Author:
  jdcasey

Constructor Summary
`FileSetManager()` Create a new manager instance with an empty messages.
`FileSetManager(org.apache.maven.plugin.logging.Log log)` Create a new manager instance with the supplied log instance.
`FileSetManager(org.apache.maven.plugin.logging.Log log, boolean verbose)` Create a new manager instance with the supplied log instance and flag for whether to output verbose messages.
`FileSetManager(org.codehaus.plexus.logging.Logger log)` Create a new manager instance with the supplied log instance.
`FileSetManager(org.codehaus.plexus.logging.Logger log, boolean verbose)` Create a new manager instance with the supplied log instance and flag for whether to output verbose messages.

Method Summary
`void` `delete(org.apache.maven.shared.model.fileset.FileSet fileSet)` Delete the matching files and directories for the given file-set definition.
`void` `delete(org.apache.maven.shared.model.fileset.FileSet fileSet, boolean throwsError)` Delete the matching files and directories for the given file-set definition.
`java.lang.String[]` `getExcludedDirectories(org.apache.maven.shared.model.fileset.FileSet fileSet)` Get all the directory names which have been excluded by the rules in this fileset.
`java.lang.String[]` `getExcludedFiles(org.apache.maven.shared.model.fileset.FileSet fileSet)` Get all the filenames which have been excluded by the rules in this fileset.
`java.lang.String[]` `getIncludedDirectories(org.apache.maven.shared.model.fileset.FileSet fileSet)` Get all the directory names which have been included by the rules in this fileset.
`java.lang.String[]` `getIncludedFiles(org.apache.maven.shared.model.fileset.FileSet fileSet)` Get all the filenames which have been included by the rules in this fileset.
`java.util.Map` `mapIncludedFiles(org.apache.maven.shared.model.fileset.FileSet fileSet)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileSetManager

    public FileSetManager(org.apache.maven.plugin.logging.Log log,
                          boolean verbose)

  Create a new manager instance with the supplied log instance and flag for whether to output verbose messages.

  Parameters:
    `log` - The mojo log instance
    `verbose` - Whether to output verbose messages

### FileSetManager

    public FileSetManager(org.apache.maven.plugin.logging.Log log)

  Create a new manager instance with the supplied log instance. Verbose flag is set to false.

  Parameters:
    `log` - The mojo log instance

### FileSetManager

    public FileSetManager(org.codehaus.plexus.logging.Logger log,
                          boolean verbose)

  Create a new manager instance with the supplied log instance and flag for whether to output verbose messages.

  Parameters:
    `log` - The mojo log instance
    `verbose` - Whether to output verbose messages

### FileSetManager

    public FileSetManager(org.codehaus.plexus.logging.Logger log)

  Create a new manager instance with the supplied log instance. Verbose flag is set to false.

  Parameters:
    `log` - The mojo log instance

### FileSetManager

    public FileSetManager()

  Create a new manager instance with an empty messages. Verbose flag is set to false.

Method Detail

### mapIncludedFiles

    public java.util.Map mapIncludedFiles(org.apache.maven.shared.model.fileset.FileSet fileSet)
                                   throws MapperException

  Parameters:
    `fileSet` -
  Returns:
    the included files as map
  Throws:
    `MapperException` - if any
  See Also:
    `getIncludedFiles(FileSet)`

### getIncludedFiles

    public java.lang.String[] getIncludedFiles(org.apache.maven.shared.model.fileset.FileSet fileSet)

  Get all the filenames which have been included by the rules in this fileset.

  Parameters:
    `fileSet` - The fileset defining rules for inclusion/exclusion, and base directory.
  Returns:
    the array of matching filenames, relative to the basedir of the file-set.

### getIncludedDirectories

    public java.lang.String[] getIncludedDirectories(org.apache.maven.shared.model.fileset.FileSet fileSet)

  Get all the directory names which have been included by the rules in this fileset.

  Parameters:
    `fileSet` - The fileset defining rules for inclusion/exclusion, and base directory.
  Returns:
    the array of matching dirnames, relative to the basedir of the file-set.

### getExcludedFiles

    public java.lang.String[] getExcludedFiles(org.apache.maven.shared.model.fileset.FileSet fileSet)

  Get all the filenames which have been excluded by the rules in this fileset.

  Parameters:
    `fileSet` - The fileset defining rules for inclusion/exclusion, and base directory.
  Returns:
    the array of non-matching filenames, relative to the basedir of the file-set.

### getExcludedDirectories

    public java.lang.String[] getExcludedDirectories(org.apache.maven.shared.model.fileset.FileSet fileSet)

  Get all the directory names which have been excluded by the rules in this fileset.

  Parameters:
    `fileSet` - The fileset defining rules for inclusion/exclusion, and base directory.
  Returns:
    the array of non-matching dirnames, relative to the basedir of the file-set.

### delete

    public void delete(org.apache.maven.shared.model.fileset.FileSet fileSet)
                throws java.io.IOException

  Delete the matching files and directories for the given file-set definition.

  Parameters:
    `fileSet` - The file-set matching rules, along with search base directory
  Throws:
    `java.io.IOException` - If a matching file cannot be deleted

### delete

    public void delete(org.apache.maven.shared.model.fileset.FileSet fileSet,
                       boolean throwsError)
                throws java.io.IOException

  Delete the matching files and directories for the given file-set definition.

  Parameters:
    `fileSet` - The file-set matching rules, along with search base directory.
    `throwsError` - Throw IOException when errors have occurred by deleting files or directories.
  Throws:
    `java.io.IOException` - If a matching file cannot be deleted and `throwsError=true`, otherwise print warning messages.

Copyright © 2011. All Rights Reserved.