org.apache.tools.ant.taskdefs
Class Tar
- SelectorContainer
Creates a tar archive.
static String | FAIL - Tar.FAIL is deprecated and is replaced with
Tar.TarLongFileMode.FAIL
|
static String | GNU - Tar.GNU is deprecated and is replaced with
Tar.TarLongFileMode.GNU
|
static String | OMIT - Tar.OMIT is deprecated and is replaced with
Tar.TarLongFileMode.OMIT
|
static String | TRUNCATE - Tar.TRUNCATE is deprecated and is replaced with
Tar.TarLongFileMode.TRUNCATE
|
static String | WARN - Tar.WARN is deprecated and is replaced with
Tar.TarLongFileMode.WARN
|
protected boolean | archiveIsUpToDate(String[] files) - use the two-arg version instead.
|
protected boolean | archiveIsUpToDate(String[] files, File dir) - Is the archive up to date in relationship to a list of files.
|
Tar.TarFileSet | createTarFileSet() - Add a new fileset with the option to specify permissions
|
void | execute() - do the business
|
void | setBasedir(File baseDir) - This is the base directory to look in for things to tar.
|
void | setCompression(Tar.TarCompressionMethod mode) - Set compression method.
|
void | setDestFile(File destFile) - Set is the name/location of where to create the tar file.
|
void | setLongfile(String mode) - setLongFile(String) is deprecated and is replaced with
setLongFile(Tar.TarLongFileMode) to make Ant's Introspection
mechanism do the work and also to encapsulate operations on
the mode in its own class.
|
void | setLongfile(Tar.TarLongFileMode mode) - Set how to handle long files, those with a path>100 chars.
|
void | setTarfile(File tarFile) - for consistency with other tasks, please use setDestFile()
|
protected void | tarFile(File file, TarOutputStream tOut, String vPath, Tar.TarFileSet tarFileSet) - tar a file
|
XsetIgnore , XsetItems , add , addAnd , addContains , addContainsRegexp , addCustom , addDate , addDepend , addDepth , addDifferent , addFilename , addMajority , addModified , addNone , addNot , addOr , addPresent , addSelector , addSize , addType , appendSelector , createExclude , createExcludesFile , createInclude , createIncludesFile , createPatternSet , getDirectoryScanner , getImplicitFileSet , getSelectors , hasSelectors , selectorCount , selectorElements , setCaseSensitive , setDefaultexcludes , setExcludes , setExcludesfile , setFollowSymlinks , setIncludes , setIncludesfile , setProject |
execute , getDescription , getLocation , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , maybeConfigure , perform , reconfigure , setDescription , setLocation , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
FAIL
public static final String FAIL
Tar.FAIL is deprecated and is replaced with
Tar.TarLongFileMode.FAIL
GNU
public static final String GNU
Tar.GNU is deprecated and is replaced with
Tar.TarLongFileMode.GNU
OMIT
public static final String OMIT
Tar.OMIT is deprecated and is replaced with
Tar.TarLongFileMode.OMIT
TRUNCATE
public static final String TRUNCATE
Tar.TRUNCATE is deprecated and is replaced with
Tar.TarLongFileMode.TRUNCATE
WARN
public static final String WARN
Tar.WARN is deprecated and is replaced with
Tar.TarLongFileMode.WARN
archiveIsUpToDate
protected boolean archiveIsUpToDate(String[] files)
use the two-arg version instead.
Is the archive up to date in relationship to a list of files.
files
- the files to check
- true if the archive is up to date.
archiveIsUpToDate
protected boolean archiveIsUpToDate(String[] files,
File dir)
Is the archive up to date in relationship to a list of files.
files
- the files to checkdir
- the base directory for the files.
- true if the archive is up to date.
createTarFileSet
public Tar.TarFileSet createTarFileSet()
Add a new fileset with the option to specify permissions
- the tar fileset to be used as the nested element.
setBasedir
public void setBasedir(File baseDir)
This is the base directory to look in for things to tar.
baseDir
- the base directory.
setCompression
public void setCompression(Tar.TarCompressionMethod mode)
Set compression method.
Allowable values are
- none - no compression
- gzip - Gzip compression
- bzip2 - Bzip2 compression
mode
- the compression method.
setDestFile
public void setDestFile(File destFile)
Set is the name/location of where to create the tar file.
destFile
- The output of the tar
setLongfile
public void setLongfile(String mode)
setLongFile(String) is deprecated and is replaced with
setLongFile(Tar.TarLongFileMode) to make Ant's Introspection
mechanism do the work and also to encapsulate operations on
the mode in its own class.
Set how to handle long files, those with a path>100 chars.
Optional, default=warn.
Allowable values are
- truncate - paths are truncated to the maximum length
- fail - paths greater than the maximum cause a build exception
- warn - paths greater than the maximum cause a warning and GNU is used
- gnu - GNU extensions are used for any paths greater than the maximum.
- omit - paths greater than the maximum are omitted from the archive
mode
- the mode string to handle long files.
setLongfile
public void setLongfile(Tar.TarLongFileMode mode)
Set how to handle long files, those with a path>100 chars.
Optional, default=warn.
Allowable values are
- truncate - paths are truncated to the maximum length
- fail - paths greater than the maximum cause a build exception
- warn - paths greater than the maximum cause a warning and GNU is used
- gnu - GNU extensions are used for any paths greater than the maximum.
- omit - paths greater than the maximum are omitted from the archive
mode
- the mode to handle long file names.
setTarfile
public void setTarfile(File tarFile)
for consistency with other tasks, please use setDestFile()
Set is the name/location of where to create the tar file.
tarFile
- the location of the tar file.
tarFile
protected void tarFile(File file,
TarOutputStream tOut,
String vPath,
Tar.TarFileSet tarFileSet)
throws IOException
tar a file
file
- the file to tartOut
- the output streamvPath
- the path name of the file to tartarFileSet
- the fileset that the file came from.
Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.