phing-tasks-ext

# Class: TarTask Source Location: /tasks/ext/TarTask.php
### Class Overview
    ProjectComponent
       |
       --Task
          |
          --MatchingTask
             |
             --TarTask
Creates a tar archive using PEAR Archive_Tar. #### Author(s): Hans Lellelid <hans@xmpl.org> (Phing) Magesh Umasankar Stefano Mazzocchi <stefano@apache.org> (Ant) Stefan Bodewig <stefan.bodewig@epost.de> (Ant) #### Version: $Id: TarTask.php 552 2009-08-29 12:18:13Z mrook $ #### Copyright: � 2001,2002 THYRELL. All rights reserved | ### Constants FAIL OMIT TAR_NAMELEN WARN | ### Methods archiveIsUpToDate createFileSet createTarFileSet init main setBasedir setCompression setDestFile setIncludeEmptyDirs setLongfile
### Inherited Variables #### Class: MatchingTask MatchingTask::$fileset MatchingTask::$useDefaultExcludes #### Class: Task Task::$description Task::$location Task::$target Task::$taskName Task::$taskType Task::$wrapper #### Class: ProjectComponent ProjectComponent::$project | ### Inherited Methods #### Class: MatchingTask MatchingTask::__construct() Create instance; set fileset to new FileSet. MatchingTask::appendSelector() Add a new selector into this container. MatchingTask::createAnd() add an "And" selector entry on the selector list MatchingTask::createContains() add a contains selector entry on the selector list MatchingTask::createCustom() add an extended selector entry on the selector list MatchingTask::createDate() add a selector date entry on the selector list MatchingTask::createDepend() add a depends selector entry on the selector list MatchingTask::createDepth() add a depth selector entry on the selector list MatchingTask::createExclude() add a name entry on the exclude list MatchingTask::createExcludesFile() add a name entry on the include files list MatchingTask::createFilename() add a selector filename entry on the selector list MatchingTask::createInclude() add a name entry on the include list MatchingTask::createIncludesFile() add a name entry on the include files list MatchingTask::createMajority() add a majority selector entry on the selector list MatchingTask::createNone() add a "None" selector entry on the selector list MatchingTask::createNot() add a "Not" selector entry on the selector list MatchingTask::createOr() add an "Or" selector entry on the selector list MatchingTask::createPatternSet() add a set of patterns MatchingTask::createPresent() add a present selector entry on the selector list MatchingTask::createSelector() add a "Select" selector entry on the selector list MatchingTask::createSize() add a selector size entry on the selector list MatchingTask::getDirectoryScanner() Returns the directory scanner needed to access the files to process. MatchingTask::getImplicitFileSet() Accessor for the implict fileset. MatchingTask::getSelectors() Returns the set of selectors as an array. MatchingTask::hasSelectors() Indicates whether there are any selectors here. MatchingTask::selectorCount() Gives the count of the number of selectors in this container MatchingTask::selectorElements() Returns an enumerator for accessing the set of selectors. MatchingTask::setCaseSensitive() Sets case sensitivity of the file system MatchingTask::setDefaultexcludes() Sets whether default exclusions should be used or not. MatchingTask::setExcludes() Sets the set of exclude patterns. Patterns may be separated by a comma or a space. MatchingTask::setExcludesfile() Sets the name of the file containing the includes patterns. MatchingTask::setFollowSymlinks() Sets whether or not symbolic links should be followed. MatchingTask::setIncludes() Sets the set of include patterns. Patterns may be separated by a comma or a space. MatchingTask::setIncludesfile() Sets the name of the file containing the includes patterns. MatchingTask::setProject() #### Class: Task Task::getDescription() Returns the textual description of the task Task::getLocation() Returns the location within the buildfile this task occurs. Used by BuildException to give detailed error messages. Task::getOwningTarget() Returns the owning target of this task. Task::getRegisterSlot() Returns a name Task::getRuntimeConfigurableWrapper() Returns the wrapper object for runtime configuration Task::getTaskName() Returns the name of task, used only for log messages Task::getTaskType() Returns the name of the task under which it was invoked, usually the XML tagname Task::init() Called by the parser to let the task initialize properly. Task::log() Provides a project level log event to the task. Task::main() Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice. Task::maybeConfigure() Configure this task if it hasn't been done already. Task::perform() Perfrom this task Task::setDescription() Sets a textual description of the task Task::setLocation() Sets the location within the buildfile this task occurs. Called by the parser to set location information. Task::setOwningTarget() Sets the owning target this task belongs to. Task::setRuntimeConfigurableWrapper() Sets the wrapper object this task should use for runtime configurable elements. Task::setTaskName() Sets the name of this task for log messages Task::setTaskType() Sets the type of the task. Usually this is the name of the XML tag #### Class: ProjectComponent ProjectComponent::getProject() Returns a reference to current project ProjectComponent::log() Logs a message with the given priority. ProjectComponent::setProject() References the project to the current component.
### Class Details [line 37] Creates a tar archive using PEAR Archive_Tar. #### Tags:
author: | Hans Lellelid <hans@xmpl.org> (Phing)
author: | Magesh Umasankar
author: | Stefano Mazzocchi <stefano@apache.org> (Ant)
author: | Stefan Bodewig <stefan.bodewig@epost.de> (Ant)
version: | $Id: TarTask.php 552 2009-08-29 12:18:13Z mrook $
copyright: | � 2001,2002 THYRELL. All rights reserved
[ Top ] ### Class Methods ### method archiveIsUpToDate [line 265]
`boolean archiveIsUpToDate( array $files, PhingFile $dir)`
#### Tags:
access: | protected
#### Parameters:
array | $files | array of filenames
PhingFile | $dir |
[ Top ] ### method createFileSet [line 89]
`FileSet createFileSet( )`
Add a new fileset. Alias to createTarFileSet() for backwards compatibility. #### Tags:
see: | TarTask::createTarFileSet()
access: | public
[ Top ] ### method createTarFileSet [line 78]
`FileSet createTarFileSet( )`
Add a new fileset #### Tags:
access: | public
[ Top ] ### method init [line 67]
`void init( )`
Ensures that PEAR lib exists. #### Tags:
access: | public
Overrides Task::init() (Called by the parser to let the task initialize properly.) [ Top ] ### method main [line 168]
`void main( )`
do the work #### Tags:
throws: | BuildException
access: | public
Overrides Task::main() (Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice.) [ Top ] ### method setBasedir [line 107]
`void setBasedir( $baseDir)`
This is the base directory to look in for things to tar. #### Tags:
access: | public
#### Parameters:
PhingFile | $baseDir |
[ Top ] ### method setCompression [line 147]
`void setCompression( $mode)`
Set compression method. Allowable values are none - no compression gzip - Gzip compression bzip2 - Bzip2 compression #### Tags:
access: | public
#### Parameters:
| $mode |
[ Top ] ### method setDestFile [line 99]
`void setDestFile( $destFile)`
Set is the name/location of where to create the tar file. #### Tags:
access: | public
#### Parameters:
PhingFile | $destFile | The output of the tar
[ Top ] ### method setIncludeEmptyDirs [line 117]
`void setIncludeEmptyDirs( boolean $bool)`
Set the include empty dirs flag. #### Tags:
access: | public
#### Parameters:
boolean | $bool | Flag if empty dirs should be tarred too
[ Top ] ### method setLongfile [line 134]
`void setLongfile( $mode)`
Set how to handle long files, those with a path&gt;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 #### Tags:
access: | public
#### Parameters:
| $mode |
[ Top ] ### Class Constants #### FAIL = "fail" [line 42] [ Top ] #### OMIT = "omit" [line 43] [ Top ] #### TAR_NAMELEN = 100 [line 39] [ Top ] #### WARN = "warn" [line 41] [ Top ] Documentation generated on Mon, 19 Oct 2009 10:52:12 +0200 by phpDocumentor 1.4.3