Package org.apache.tools.ant.taskdefs

## Class Tar.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
            - - org.apache.tools.ant.taskdefs.Tar.TarFileSet

- All Implemented Interfaces:
    `java.lang.Cloneable`, `java.lang.Iterable<Resource>`, `ResourceCollection`, `SelectorContainer`
  Enclosing class:
    Tar

      public static class Tar.TarFileSet
      extends TarFileSet

  This is a FileSet with the option to specify permissions and other attributes.

- - ### 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
    Constructor | Description
    --- | ---
    `TarFileSet()` | Creates a new `TarFileSet` instance.
    `TarFileSet​(FileSet fileset)` | Creates a new `TarFileSet` instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String[]` | `getFiles​(Project p)` | Get a list of files and directories specified in the fileset.
    `int` | `getMode()` |
    `boolean` | `getPreserveLeadingSlashes()` |
    `void` | `setMode​(java.lang.String octalString)` | A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644
    `void` | `setPreserveLeadingSlashes​(boolean b)` | Flag to indicates whether leading `/'s should be preserved in the file names.

    - ### Methods inherited from class org.apache.tools.ant.types.TarFileSet

      `clone, configureFileSet, getGid, getGroup, getRef, getRef, getUid, getUserName, hasGroupBeenSet, hasGroupIdBeenSet, hasUserIdBeenSet, hasUserNameBeenSet, newArchiveScanner, setGid, setGroup, setRefid, setUid, setUserName`

    - ### 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 Detail

    - #### TarFileSet

          public TarFileSet​(FileSet fileset)

      Creates a new `TarFileSet` instance. Using a fileset as a constructor argument.
      Parameters:
        `fileset` - a `FileSet` value

    - #### TarFileSet

          public TarFileSet()

      Creates a new `TarFileSet` instance.

  - ### Method Detail

    - #### getFiles

          public java.lang.String[] getFiles​(Project p)

      Get a list of files and directories specified in the fileset.
      Parameters:
        `p` - the current project.
      Returns:
        a list of file and directory names, relative to the baseDir for the project.

    - #### setMode

          public void setMode​(java.lang.String octalString)

      A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644
      Parameters:
        `octalString` - a 3 digit octal string.

    - #### getMode

          public int getMode()

      Returns:
        the current mode.

    - #### setPreserveLeadingSlashes

          public void setPreserveLeadingSlashes​(boolean b)

      Flag to indicates whether leading `/'s should be preserved in the file names. Optional, default is `false`.
      Parameters:
        `b` - the leading slashes flag.

    - #### getPreserveLeadingSlashes

          public boolean getPreserveLeadingSlashes()

      Returns:
        the leading slashes flag.