org.apache.tools.ant.taskdefs

Class Tar.TarFileSet

public static class Tar.TarFileSet extends FileSet

This is a FileSet with the option to specify permissions and other attributes.
Constructor Summary
TarFileSet(FileSet fileset)
Creates a new TarFileSet instance.
TarFileSet()
Creates a new TarFileSet instance.
Method Summary
intgetDirMode()
String[]getFiles(Project p)
Get a list of files and directories specified in the fileset.
StringgetFullpath()
intgetGid()
StringgetGroup()
intgetMode()
StringgetPrefix()
booleangetPreserveLeadingSlashes()
intgetUid()
StringgetUserName()
voidsetDirMode(String octalString)
A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0755
voidsetFullpath(String fullpath)
If the fullpath attribute is set, the file in the fileset is written with that path in the archive.
voidsetGid(int gid)
The GID for the tar entry; optional, default="0" This is not the same as the group name.
voidsetGroup(String groupName)
The groupname for the tar entry; optional, default="" This is not the same as the GID.
voidsetMode(String octalString)
A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644
voidsetPrefix(String prefix)
If the prefix attribute is set, all files in the fileset are prefixed with that path in the archive. optional.
voidsetPreserveLeadingSlashes(boolean b)
Flag to indicates whether leading `/'s should be preserved in the file names.
voidsetUid(int uid)
The uid for the tar entry This is not the same as the User name.
voidsetUserName(String userName)
The username for the tar entry This is not the same as the UID.

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

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-2007 Apache Software Foundation. All Rights Reserved.