Package org.apache.tools.ant.types
Class TarFileSet
- java.lang.Object
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- java.lang.Iterable<Resource>,- ResourceCollection,- SelectorContainer
 - Direct Known Subclasses:
- Tar.TarFileSet
 
 public class TarFileSet extends ArchiveFileSet A TarFileSet is a FileSet with extra attributes useful in the context of Tar/Jar tasks. A TarFileSet extends FileSets with the ability to extract a subset of the entries of a Tar file for inclusion in another Tar file. It also includes a prefix attribute which is prepended to each entry in the output Tar file.
- 
- 
Field Summary- 
Fields inherited from class org.apache.tools.ant.types.ArchiveFileSetDEFAULT_DIR_MODE, DEFAULT_FILE_MODE
 - 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description TarFileSet()Constructor for TarFileSetprotectedTarFileSet(FileSet fileset)Constructor using a fileset argument.protectedTarFileSet(TarFileSet fileset)Constructor using a tarfileset argument.
 - 
Method SummaryModifier and Type Method Description java.lang.Objectclone()Return a TarFileSet that has the same properties as this one.protected voidconfigureFileSet(ArchiveFileSet zfs)Configure a fileset based on this fileset.intgetGid()java.lang.StringgetGroup()protected AbstractFileSetgetRef()A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attributeprotected AbstractFileSetgetRef(Project p)A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attributeintgetUid()java.lang.StringgetUserName()booleanhasGroupBeenSet()booleanhasGroupIdBeenSet()booleanhasUserIdBeenSet()booleanhasUserNameBeenSet()protected ArchiveScannernewArchiveScanner()Create a new scanner.voidsetGid(int gid)The GID for the tar entry; optional, default="0" This is not the same as the group name.voidsetGroup(java.lang.String groupName)The groupname for the tar entry; optional, default="" This is not the same as the GID.voidsetRefid(Reference r)Makes this instance in effect a reference to another instance.voidsetUid(int uid)The uid for the tar entry This is not the same as the User name.voidsetUserName(java.lang.String userName)The username for the tar entry This is not the same as the UID.- 
Methods inherited from class org.apache.tools.ant.types.ArchiveFileSetaddConfigured, dieOnCircularReference, getDirectoryScanner, getDirMode, getDirMode, getEncoding, getFileMode, getFileMode, getFullpath, getFullpath, getPrefix, getPrefix, getSrc, getSrc, hasDirModeBeenSet, hasFileModeBeenSet, integerSetDirMode, integerSetFileMode, isFilesystemOnly, iterator, setDir, setDirMode, setEncoding, setErrorOnMissingArchive, setFileMode, setFullpath, setPrefix, setSrc, setSrcResource, size, toString
 - 
Methods inherited from class org.apache.tools.ant.types.AbstractFileSetadd, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addExecutable, addFilename, addMajority, addModified, addNone, addNot, addOr, addOwnedBy, addPosixGroup, addPosixPermissions, addPresent, addReadable, addSelector, addSize, addSymlink, addType, addWritable, appendExcludes, appendIncludes, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDefaultexcludes, getDir, getDir, getDirectoryScanner, getErrorOnMissingDir, getMaxLevelsOfSymlinks, getSelectors, hasPatterns, hasSelectors, isCaseSensitive, isFollowSymlinks, mergeExcludes, mergeIncludes, mergePatterns, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setErrorOnMissingDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setMaxLevelsOfSymlinks, setupDirectoryScanner, setupDirectoryScanner
 - 
Methods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
 - 
Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
 
- 
 
- 
- 
- 
Constructor Detail- 
TarFileSetpublic TarFileSet() Constructor for TarFileSet
 - 
TarFileSetprotected TarFileSet(FileSet fileset) Constructor using a fileset argument.- Parameters:
- fileset- the fileset to use
 
 - 
TarFileSetprotected TarFileSet(TarFileSet fileset) Constructor using a tarfileset argument.- Parameters:
- fileset- the tarfileset to use
 
 
- 
 - 
Method Detail- 
setUserNamepublic void setUserName(java.lang.String userName) The username for the tar entry This is not the same as the UID.- Parameters:
- userName- the user name for the tar entry.
 
 - 
getUserNamepublic java.lang.String getUserName() - Returns:
- the user name for the tar entry
 
 - 
hasUserNameBeenSetpublic boolean hasUserNameBeenSet() - Returns:
- whether the user name has been explicitly set.
 
 - 
setUidpublic void setUid(int uid) The uid for the tar entry This is not the same as the User name.- Parameters:
- uid- the id of the user for the tar entry.
 
 - 
getUidpublic int getUid() - Returns:
- the uid for the tar entry
 
 - 
hasUserIdBeenSetpublic boolean hasUserIdBeenSet() - Returns:
- whether the user id has been explicitly set.
 
 - 
setGrouppublic void setGroup(java.lang.String groupName) The groupname for the tar entry; optional, default="" This is not the same as the GID.- Parameters:
- groupName- the group name string.
 
 - 
getGrouppublic java.lang.String getGroup() - Returns:
- the group name string.
 
 - 
hasGroupBeenSetpublic boolean hasGroupBeenSet() - Returns:
- whether the group name has been explicitly set.
 
 - 
setGidpublic void setGid(int gid) The GID for the tar entry; optional, default="0" This is not the same as the group name.- Parameters:
- gid- the group id.
 
 - 
getGidpublic int getGid() - Returns:
- the group identifier.
 
 - 
hasGroupIdBeenSetpublic boolean hasGroupIdBeenSet() - Returns:
- whether the group id has been explicitly set.
 
 - 
newArchiveScannerprotected ArchiveScanner newArchiveScanner() Create a new scanner.- Specified by:
- newArchiveScannerin class- ArchiveFileSet
- Returns:
- the created scanner.
 
 - 
setRefidpublic void setRefid(Reference r) throws BuildException Makes this instance in effect a reference to another instance.You must not set another attribute or nest elements inside this element if you make it a reference. - Overrides:
- setRefidin class- AbstractFileSet
- Parameters:
- r- the- Referenceto use.
- Throws:
- BuildException- on error
 
 - 
getRefprotected AbstractFileSet getRef(Project p) A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute
 - 
getRefprotected AbstractFileSet getRef() A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute- Overrides:
- getRefin class- ArchiveFileSet
- Returns:
- the abstract fileset instance
 
 - 
configureFileSetprotected void configureFileSet(ArchiveFileSet zfs) Configure a fileset based on this fileset. If the fileset is a TarFileSet copy in the tarfileset specific attributes.- Overrides:
- configureFileSetin class- ArchiveFileSet
- Parameters:
- zfs- the archive fileset to configure.
 
 - 
clonepublic java.lang.Object clone() Return a TarFileSet that has the same properties as this one.- Overrides:
- clonein class- ArchiveFileSet
- Returns:
- the cloned tarFileSet
 
 
- 
 
-