Package org.apache.tools.ant.types

# Class TarFileSet

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.AbstractFileSet
org.apache.tools.ant.types.FileSet
org.apache.tools.ant.types.ArchiveFileSet
org.apache.tools.ant.types.TarFileSet

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.ArchiveFileSet

`DEFAULT_DIR_MODE, DEFAULT_FILE_MODE`

### Fields inherited from class org.apache.tools.ant.types.DataType

`checked, ref`

### Fields inherited from class org.apache.tools.ant.ProjectComponent

`description, location, project`

## Constructor Summary

Constructors
Modifier | Constructor | Description
--- | --- | ---
`` | `TarFileSet()` | Constructor for TarFileSet
`protected` | `TarFileSet​(FileSet fileset)` | Constructor using a fileset argument.
`protected` | `TarFileSet​(TarFileSet fileset)` | Constructor using a tarfileset argument.

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`java.lang.Object` | `clone()` | Return a TarFileSet that has the same properties as this one.
`protected void` | `configureFileSet​(ArchiveFileSet zfs)` | Configure a fileset based on this fileset.
`int` | `getGid()` |
`java.lang.String` | `getGroup()` |
`protected AbstractFileSet` | `getRef()` | A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute
`protected 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
`int` | `getUid()` |
`java.lang.String` | `getUserName()` |
`boolean` | `hasGroupBeenSet()` |
`boolean` | `hasGroupIdBeenSet()` |
`boolean` | `hasUserIdBeenSet()` |
`boolean` | `hasUserNameBeenSet()` |
`protected ArchiveScanner` | `newArchiveScanner()` | Create a new scanner.
`void` | `setGid​(int gid)` | The GID for the tar entry; optional, default="0" This is not the same as the group name.
`void` | `setGroup​(java.lang.String groupName)` | The groupname for the tar entry; optional, default="" This is not the same as the GID.
`void` | `setRefid​(Reference r)` | Makes this instance in effect a reference to another instance.
`void` | `setUid​(int uid)` | The uid for the tar entry This is not the same as the User name.
`void` | `setUserName​(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.ArchiveFileSet

`addConfigured, 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.AbstractFileSet

`add, 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.DataType

`checkAttributesAllowed, 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.ProjectComponent

`getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Methods inherited from interface org.apache.tools.ant.types.ResourceCollection

`isEmpty, stream`

## Constructor Details

### TarFileSet

public TarFileSet()
Constructor for TarFileSet

### TarFileSet

protected TarFileSet​(FileSet fileset)
Constructor using a fileset argument.

Parameters:
  `fileset` - the fileset to use

### TarFileSet

protected TarFileSet​(TarFileSet fileset)
Constructor using a tarfileset argument.

Parameters:
  `fileset` - the tarfileset to use

## Method Details

### setUserName

public 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.

### getUserName

public java.lang.String getUserName()

Returns:
  the user name for the tar entry

### hasUserNameBeenSet

public boolean hasUserNameBeenSet()

Returns:
  whether the user name has been explicitly set.

### setUid

public 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.

### getUid

public int getUid()

Returns:
  the uid for the tar entry

### hasUserIdBeenSet

public boolean hasUserIdBeenSet()

Returns:
  whether the user id has been explicitly set.

### setGroup

public 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.

### getGroup

public java.lang.String getGroup()

Returns:
  the group name string.

### hasGroupBeenSet

public boolean hasGroupBeenSet()

Returns:
  whether the group name has been explicitly set.

### setGid

public 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.

### getGid

public int getGid()

Returns:
  the group identifier.

### hasGroupIdBeenSet

public boolean hasGroupIdBeenSet()

Returns:
  whether the group id has been explicitly set.

### newArchiveScanner

protected ArchiveScanner newArchiveScanner()
Create a new scanner.

Specified by:
  `newArchiveScanner` in class `ArchiveFileSet`
Returns:
  the created scanner.

### setRefid

public 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:
  `setRefid` in class `AbstractFileSet`
Parameters:
  `r` - the `Reference` to use.
Throws:
  `BuildException` - on error

### getRef

protected 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

Overrides:
  `getRef` in class `FileSet`
Parameters:
  `p` - the project to use
Returns:
  the abstract fileset instance

### getRef

protected 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:
  `getRef` in class `ArchiveFileSet`
Returns:
  the abstract fileset instance

### configureFileSet

protected void configureFileSet​(ArchiveFileSet zfs)
Configure a fileset based on this fileset. If the fileset is a TarFileSet copy in the tarfileset specific attributes.

Overrides:
  `configureFileSet` in class `ArchiveFileSet`
Parameters:
  `zfs` - the archive fileset to configure.

### clone

public java.lang.Object clone()
Return a TarFileSet that has the same properties as this one.

Overrides:
  `clone` in class `ArchiveFileSet`
Returns:
  the cloned tarFileSet