org.apache.tools.ant.taskdefs

Class Tar.TarFileSet

Enclosing Class:
Tar
Implemented Interfaces:
Cloneable, SelectorContainer

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

TarFileSet()
Creates a new TarFileSet instance.
TarFileSet(FileSet fileset)
Creates a new TarFileSet instance.

Method Summary

int
getDirMode()
String[]
getFiles(Project p)
Get a list of files and directories specified in the fileset.
String
getFullpath()
int
getGid()
String
getGroup()
int
getMode()
String
getPrefix()
boolean
getPreserveLeadingSlashes()
int
getUid()
String
getUserName()
void
setDirMode(String octalString)
A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0755
void
setFullpath(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(String groupName)
The groupname for the tar entry; optional, default="" This is not the same as the GID.
void
setMode(String octalString)
A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644
void
setPrefix(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(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, clone, 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, setRefid, tooManyAttributes

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Constructor Details

TarFileSet

public TarFileSet()
Creates a new TarFileSet instance.

TarFileSet

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

Method Details

getDirMode

public int getDirMode()
Returns:
the current directory mode
Since:
Ant 1.6

getFiles

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

getFullpath

public String getFullpath()
Returns:
the path to use for a single file fileset.

getGid

public int getGid()
Returns:
the group identifier.

getGroup

public String getGroup()
Returns:
the group name string.

getMode

public int getMode()
Returns:
the current mode.

getPrefix

public String getPrefix()
Returns:
the path prefix for the files in the fileset.

getPreserveLeadingSlashes

public boolean getPreserveLeadingSlashes()
Returns:
the leading slashes flag.

getUid

public int getUid()
Returns:
the uid for the tar entry

getUserName

public String getUserName()
Returns:
the user name for the tar entry

setDirMode

public void setDirMode(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

setFullpath

public void setFullpath(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.

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.

setGroup

public void setGroup(String groupName)
The groupname for the tar entry; optional, default="" This is not the same as the GID.
Parameters:
groupName - the group name string.

setMode

public void setMode(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.

setPrefix

public void setPrefix(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.

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.

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.

setUserName

public void setUserName(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.

Copyright B) 2000-2008 Apache Software Foundation. All Rights Reserved.