Tar.TarFileSet (Apache Ant API)
Keywords: org.apache.tools.ant.taskdefs.Tar.TarFileSet,Tar.TarFileSet class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.taskdefs.Tar.TarFileSet

All Implemented Interfaces:
  java.lang.Cloneable, SelectorContainer

Enclosing class:
  Tar

public static class Tar.TarFileSet
extends FileSet

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

Field Summary

Fields inherited from class org.apache.tools.ant.types.DataType
`checked, description, ref`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`Tar.TarFileSet()` Creates a new `TarFileSet` instance.
`Tar.TarFileSet(FileSet fileset)` Creates a new `TarFileSet` instance.

Method Summary
`int` | `getDirMode()`
`java.lang.String[]` | `getFiles(Project p)` Get a list of files and directories specified in the fileset.
`java.lang.String` | `getFullpath()`
`int` | `getGid()`
`java.lang.String` | `getGroup()`
`int` | `getMode()`
`java.lang.String` | `getPrefix()`
`boolean` | `getPreserveLeadingSlashes()`
`int` | `getUid()`
`java.lang.String` | `getUserName()`
`void` | `setDirMode(java.lang.String octalString)` A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0755
`void` | `setFullpath(java.lang.String fullpath)` If the fullpath attribute is set, the file in the fileset is written with that path in the archive.
`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` | `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` | `setPrefix(java.lang.String prefix)` If the prefix attribute is set, all files in the fileset are prefixed with that path in the archive.
`void` | `setPreserveLeadingSlashes(boolean b)` Flag to indicates whether leading `/'s should be preserved in the file names.
`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.FileSet
`clone`

Methods inherited from class org.apache.tools.ant.types.AbstractFileSet
`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, getDataTypeName, getDefaultexcludes, getDir, getDirectoryScanner, getRef, getSelectors, hasPatterns, hasSelectors, isFollowSymlinks, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setRefid, setupDirectoryScanner, toString`

Methods inherited from class org.apache.tools.ant.types.DataType
`checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, getCheckedRef, getDescription, getRefid, isChecked, isReference, noChildrenAllowed, setChecked, setDescription, tooManyAttributes`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject, log, log, setProject`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Tar.TarFileSet

    public Tar.TarFileSet(FileSet fileset)

  Creates a new `TarFileSet` instance. Using a fileset as a constructor argument.

Parameters:
  `fileset` - a `FileSet` value

### Tar.TarFileSet

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

### setDirMode

    public void setDirMode(java.lang.String octalString)

  A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0755

  Parameters:
    `octalString` - a 3 digit octal string.
  Since:
    Ant 1.6

### getDirMode

    public int getDirMode()

  Returns:
    the current directory mode
  Since:
    Ant 1.6

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

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

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

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

### setPrefix

    public void setPrefix(java.lang.String prefix)

  If the prefix attribute is set, all files in the fileset are prefixed with that path in the archive. optional.

  Parameters:
    `prefix` - the path prefix.

### getPrefix

    public java.lang.String getPrefix()

  Returns:
    the path prefix for the files in the fileset.

### setFullpath

    public void setFullpath(java.lang.String fullpath)

  If the fullpath attribute is set, the file in the fileset is written with that path in the archive. The prefix attribute, if specified, is ignored. It is an error to have more than one file specified in such a fileset.

  Parameters:
    `fullpath` - the path to use for the file in a fileset.

### getFullpath

    public java.lang.String getFullpath()

  Returns:
    the path to use for a single file fileset.

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.