tasks/ext/TarTask.php

Show: inherited
Table of Contents

\TarFileSet

Package: phing\tasks\ext

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

Propertyprivate  $files= 'null'
Default valuenullDetails
Type
n/a
Propertyprivate  $fullpath= '""'
Default value""Details
Type
n/a
Propertyprivate  $groupName= '""'
Default value""Details
Type
n/a
Propertyprivate  $mode= '0100644'
Default value0100644Details
Type
n/a
Propertyprivate  $prefix= '""'
Default value""Details
Type
n/a
Propertyprivate  $preserveLeadingSlashes= 'false'
Default valuefalseDetails
Type
n/a
Propertyprivate  $userName= '""'
Default value""Details
Type
n/a

Methods

methodpublic__clone( ) : void

methodpublic__construct( ) : void

methodpublicappendSelector( ) : void

methodpubliccircularReference( ) : void

methodpubliccreateAnd( ) : void

methodpubliccreateContains( ) : void

methodpubliccreateContainsRegexp( ) : void

methodpubliccreateCustom( ) : void

methodpubliccreateDate( ) : void

methodpubliccreateDepend( ) : void

methodpubliccreateDepth( ) : void

methodpubliccreateExclude( ) : void

methodpubliccreateExcludesFile( ) : void

methodpubliccreateFilename( ) : void

methodpubliccreateInclude( ) : void

methodpubliccreateIncludesFile( ) : void

methodpubliccreateMajority( ) : void

methodpubliccreateNone( ) : void

methodpubliccreateNot( ) : void

methodpubliccreateOr( ) : void

methodpubliccreatePatternSet( ) : void

methodpubliccreatePresent( ) : void

methodpubliccreateSelector( ) : void

methodpubliccreateSize( ) : void

methodpubliccreateType( ) : void

methodpublicdieOnCircularReference( ) : void

methodpublicgetCheckedRef( ) : void

methodpublicgetDescription( ) : void

methodpublicgetDir( ) : void

methodpublicgetDirectoryScanner( ) : void

methodpublicgetFiles(  $p,  $includeEmpty = true ) : void

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

Parameters
Name Type Description
$p
$includeEmpty
methodpublicgetFullpath( ) : void

methodpublicgetGroup( ) : void

methodpublicgetMode( ) : void

methodpublicgetPrefix( ) : void

methodpublicgetPreserveLeadingSlashes( ) : void

methodpublicgetProject( ) : void

methodpublicgetRef( ) : void

methodpublicgetSelectors( ) : void

methodpublicgetUserName( ) : void

methodpublichasPatterns( ) : void

methodpublichasSelectors( ) : void

methodpublicisReference( ) : void

methodpubliclog( ) : void

methodpublicnoChildrenAllowed( ) : void

methodpublicparsingComplete( ) : void

methodpublicselectorCount( ) : void

methodpublicselectorElements( ) : void

methodpublicsetCaseSensitive( ) : void

methodpublicsetDefaultexcludes( ) : void

methodpublicsetDescription( ) : void

methodpublicsetDir( ) : void

methodpublicsetExcludes( ) : void

methodpublicsetExcludesfile( ) : void

methodpublicsetExpandSymbolicLinks( ) : void

methodpublicsetFullpath(  $fullpath ) : void

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
Name Type Description
$fullpath
methodpublicsetGroup(  $groupName ) : void

The groupname for the tar entry; optional, default="" This is not the same as the GID, which is not currently set by the task.

Parameters
Name Type Description
$groupName
methodpublicsetIncludes( ) : void

methodpublicsetIncludesfile( ) : void

methodpublicsetMode( string $octalString ) : void

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

Parameters
Name Type Description
$octalString string
methodpublicsetPrefix(  $prefix ) : void

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

optional.

Parameters
Name Type Description
$prefix
methodpublicsetPreserveLeadingSlashes(  $b ) : void

Flag to indicates whether leading `/'s should be preserved in the file names.

Optional, default is

false

.

Parameters
Name Type Description
$b
methodpublicsetProject( ) : void

methodpublicsetRefid( ) : void

methodpublicsetUserName(  $userName ) : void

The username for the tar entry This is not the same as the UID, which is not currently set by the task.

Parameters
Name Type Description
$userName
methodprotectedsetupDirectoryScanner( ) : void

methodpublictooManyAttributes( ) : void

\TarTask

Package: phing\tasks\ext

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

Constant  TAR_NAMELEN = 100
Constant  WARN = "warn"
Constant  FAIL = "fail"
Constant  OMIT = "omit"

Properties

Propertyprivate  $baseDir= ''
Details
Type
n/a
Propertyprivate  $compression= 'null'

Compression mode. Available options "gzip", "bzip2", "none" (null).

Default valuenullDetails
Type
n/a
Propertyprivate  $fileSetFiles= 'array()'
Default valuearray()Details
Type
n/a
Propertyprivate  $filesets= 'array()'
Default valuearray()Details
Type
n/a
Propertyprivate  $includeEmpty= 'true'
Default valuetrueDetails
Type
n/a
Propertyprivate  $longFileMode= '"warn"'
Default value"warn"Details
Type
n/a
Propertyprivate  $longWarningGiven= 'false'

Indicates whether the user has been warned about long files already.

Default valuefalseDetails
Type
n/a
Propertyprivatestring  $prefix= 'null'

File path prefix in the tar archive

Default valuenullDetails
Type
string
Propertyprivate  $tarFile= ''
Details
Type
n/a

Methods

methodpublic__construct( ) : void

methodpublicappendSelector( ) : void

methodprotectedarchiveIsUpToDate( array $files, \PhingFile $dir ) : boolean

Parameters
Name Type Description
$files array

array of filenames

$dir \PhingFile
Returns
Type Description
boolean
methodpubliccreateAnd( ) : void

methodpubliccreateContains( ) : void

methodpubliccreateCustom( ) : void

methodpubliccreateDate( ) : void

methodpubliccreateDepend( ) : void

methodpubliccreateDepth( ) : void

methodpubliccreateExclude( ) : void

methodpubliccreateExcludesFile( ) : void

methodpubliccreateFileSet( ) : \FileSet

Add a new fileset. Alias to createTarFileSet() for backwards compatibility.

Returns
Type Description
\FileSet
Details
See
\createTarFileSet()  
methodpubliccreateFilename( ) : void

methodpubliccreateInclude( ) : void

methodpubliccreateIncludesFile( ) : void

methodpubliccreateMajority( ) : void

methodpubliccreateNone( ) : void

methodpubliccreateNot( ) : void

methodpubliccreateOr( ) : void

methodpubliccreatePatternSet( ) : void

methodpubliccreatePresent( ) : void

methodpubliccreateSelector( ) : void

methodpubliccreateSize( ) : void

methodpubliccreateTarFileSet( ) : \FileSet

Add a new fileset

Returns
Type Description
\FileSet
methodpublicgetDescription( ) : void

methodprotectedgetDirectoryScanner( ) : void

methodprotectedgetImplicitFileSet( ) : void
final

methodpublicgetLocation( ) : void

methodpublicgetOwningTarget( ) : void

methodpublicgetProject( ) : void

methodprotectedgetRegisterSlot( ) : void

methodpublicgetRuntimeConfigurableWrapper( ) : void

methodpublicgetSelectors( ) : void

methodpublicgetTaskName( ) : void

methodpublicgetTaskType( ) : void

methodpublichasSelectors( ) : void

methodpublicinit( ) : void

Ensures that PEAR lib exists.

methodpubliclog( ) : void

methodpublicmain( ) : void

do the work

Throws
Exception Description
\BuildException
methodpublicmaybeConfigure( ) : void

methodpublicperform( ) : void

methodpublicselectorCount( ) : void

methodpublicselectorElements( ) : void

methodpublicsetBasedir( \PhingFile $baseDir ) : void

This is the base directory to look in for things to tar.

Parameters
Name Type Description
$baseDir \PhingFile
methodpublicsetCaseSensitive( ) : void

methodpublicsetCompression(  $mode ) : void

Set compression method.

Allowable values are

  • none - no compression
  • gzip - Gzip compression
  • bzip2 - Bzip2 compression
Parameters
Name Type Description
$mode
methodpublicsetDefaultexcludes( ) : void

methodpublicsetDescription( ) : void

methodpublicsetDestFile( \PhingFile $destFile ) : void

Set is the name/location of where to create the tar file.

Parameters
Name Type Description
$destFile \PhingFile

The output of the tar

methodpublicsetExcludes( ) : void

methodpublicsetExcludesfile( ) : void

methodpublicsetFollowSymlinks( ) : void

methodpublicsetIncludeEmptyDirs( boolean $bool ) : void

Set the include empty dirs flag.

Parameters
Name Type Description
$bool boolean

Flag if empty dirs should be tarred too

Details
Access
public  
methodpublicsetIncludes( ) : void

methodpublicsetIncludesfile( ) : void

methodpublicsetLocation( ) : void

methodpublicsetLongfile(  $mode ) : void

Set 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
Parameters
Name Type Description
$mode
methodpublicsetOwningTarget( ) : void

methodpublicsetPrefix( string $prefix ) : void

Sets the file path prefix for file in the tar file.

Parameters
Name Type Description
$prefix string

Prefix

methodpublicsetProject( ) : void

methodpublicsetRuntimeConfigurableWrapper( ) : void

methodpublicsetTaskName( ) : void

methodpublicsetTaskType( ) : void

Documentation was generated by DocBlox 0.17.1.