tasks/ext/TarTask.php
\TarFileSet
This is a FileSet with the option to specify permissions.
Permissions are currently not implemented by PEAR Archive_Tar, but hopefully they will be in the future.
- Parent(s)
- \FileSet < \AbstractFileSet < \DataType < \ProjectComponent
Properties
Methods

getFiles(
$p, $includeEmpty
=
true
)
:
voidGet a list of files and directories specified in the fileset.
@return array a list of file and directory names, relative to the baseDir for the project.
| Name | Type | Description |
|---|---|---|
| $p | ||
| $includeEmpty |

setFullpath(
$fullpath
)
:
voidIf 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.
| Name | Type | Description |
|---|---|---|
| $fullpath |

setGroup(
$groupName
)
:
voidThe groupname for the tar entry; optional, default="" This is not the same as the GID, which is not currently set by the task.
| Name | Type | Description |
|---|---|---|
| $groupName |

setMode(
string $octalString
)
:
voidA 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644
| Name | Type | Description |
|---|---|---|
| $octalString | string |

setPrefix(
$prefix
)
:
voidIf the prefix attribute is set, all files in the fileset are prefixed with that path in the archive.
optional.
| Name | Type | Description |
|---|---|---|
| $prefix |

setPreserveLeadingSlashes(
$b
)
:
voidFlag to indicates whether leading `/'s should be preserved in the file names.
Optional, default is
false
.
| Name | Type | Description |
|---|---|---|
| $b |

setUserName(
$userName
)
:
voidThe username for the tar entry This is not the same as the UID, which is not currently set by the task.
| Name | Type | Description |
|---|---|---|
| $userName |
\TarTask
Creates a tar archive using PEAR Archive_Tar.
- Parent(s)
- \MatchingTask < \Task < \ProjectComponent
- Author
- Hans Lellelid
(Phing) - Author
- Stefano Mazzocchi
(Ant) - Author
- Stefan Bodewig
(Ant) - Author
- Magesh Umasankar
- Version
- $Id: TarTask.php 1379 2011-12-07 19:59:40Z mrook $
Constants
Properties

$compression= 'null'
Compression mode. Available options "gzip", "bzip2", "none" (null).
nullDetails- Type
- n/a

$longWarningGiven= 'false'
Indicates whether the user has been warned about long files already.
falseDetails- Type
- n/a
Methods

archiveIsUpToDate(
array $files, \PhingFile $dir
)
:
boolean| Name | Type | Description |
|---|---|---|
| $files | array | array of filenames |
| $dir | \PhingFile |
| Type | Description |
|---|---|
| boolean |

createFileSet(
)
:
\FileSetAdd a new fileset. Alias to createTarFileSet() for backwards compatibility.
| Type | Description |
|---|---|
| \FileSet |
- See
- \createTarFileSet()

setBasedir(
\PhingFile $baseDir
)
:
voidThis is the base directory to look in for things to tar.
| Name | Type | Description |
|---|---|---|
| $baseDir | \PhingFile |

setCompression(
$mode
)
:
voidSet compression method.
Allowable values are
- none - no compression
- gzip - Gzip compression
- bzip2 - Bzip2 compression
| Name | Type | Description |
|---|---|---|
| $mode |

setDestFile(
\PhingFile $destFile
)
:
voidSet is the name/location of where to create the tar file.
| Name | Type | Description |
|---|---|---|
| $destFile | \PhingFile | The output of the tar |

setIncludeEmptyDirs(
boolean $bool
)
:
voidSet the include empty dirs flag.
| Name | Type | Description |
|---|---|---|
| $bool | boolean | Flag if empty dirs should be tarred too |
- Access
- public

setLongfile(
$mode
)
:
voidSet how to handle long files, those with a path>100 chars.
Optional, default=warn.
<
p> Allowable values are
- truncate - paths are truncated to the maximum length
- fail - paths greater than the maximim cause a build exception
- warn - paths greater than the maximum cause a warning and GNU is used
- gnu - GNU extensions are used for any paths greater than the maximum.
- omit - paths greater than the maximum are omitted from the archive
| Name | Type | Description |
|---|---|---|
| $mode |

setPrefix(
string $prefix
)
:
voidSets the file path prefix for file in the tar file.
| Name | Type | Description |
|---|---|---|
| $prefix | string | Prefix |