org.codehaus.mojo.truezip.internal
Class TrueZipFileSetManager

java.lang.Object
  extended by org.codehaus.mojo.truezip.internal.TrueZipFileSetManager

public class TrueZipFileSetManager
extends Object

Provides operations for use with FileSet instances, such as retrieving the included/excluded files, deleting all matching entries, etc. This is a fork of maven's shared FileSetManager with the following changes - Use TrueZipDirectoryScanner instead DirectoryScanner - use java.io.File in isSymLink(); Note: symbolic support is unsupported

Version:
$Id$
Author:
jdcasey

Constructor Summary
TrueZipFileSetManager()
          Create a new manager instance with the supplied log instance and flag for whether to output verbose messages.
 
Method Summary
 void delete(TrueZipFileSet fileSet)
          Delete the matching files and directories for the given file-set definition.
 void delete(TrueZipFileSet fileSet, boolean throwsError)
          Delete the matching files and directories for the given file-set definition.
 String[] getExcludedDirectories(TrueZipFileSet fileSet)
          Get all the directory names which have been excluded by the rules in this fileset.
 String[] getExcludedFiles(TrueZipFileSet fileSet)
          Get all the filenames which have been excluded by the rules in this fileset.
 String[] getIncludedDirectories(TrueZipFileSet fileSet)
          Get all the directory names which have been included by the rules in this fileset.
 String[] getIncludedFiles(TrueZipFileSet fileSet)
          Get all the filenames which have been included by the rules in this fileset.
 Map mapIncludedFiles(TrueZipFileSet fileSet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrueZipFileSetManager

public TrueZipFileSetManager()
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
Method Detail

mapIncludedFiles

public Map mapIncludedFiles(TrueZipFileSet fileSet)
                     throws org.apache.maven.shared.model.fileset.mappers.MapperException
Parameters:
fileSet -
Returns:
the included files as map
Throws:
org.apache.maven.shared.model.fileset.mappers.MapperException - if any
See Also:
#getIncludedFiles(FileSet)

getIncludedFiles

public String[] getIncludedFiles(TrueZipFileSet 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 String[] getIncludedDirectories(TrueZipFileSet 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 String[] getExcludedFiles(TrueZipFileSet 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 String[] getExcludedDirectories(TrueZipFileSet 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(TrueZipFileSet fileSet)
            throws 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:
IOException - If a matching file cannot be deleted

delete

public void delete(TrueZipFileSet fileSet,
                   boolean throwsError)
            throws 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:
IOException - If a matching file cannot be deleted and throwsError=true, otherwise print warning messages.


Copyright © 2012 Codehaus. All Rights Reserved.