# classes/phing/tasks/system/UpToDateTask.php

## \UpToDateTask
jump to top

Sets the given property if the specified target has a timestamp greater than all of the source files.

Use {@link Project#createTask} to register a new Task.

Extends from
  \Task
Implements
  \Condition
author
  Hans Lellelid (Phing)
author
  William Ferguson (Ant)
author
  Hiroaki Nakamura (Ant)
author
  Stefan Bodewig (Ant)
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
version
  $Revision: 911 $

### Properties

`$_property= ''`
Details

Type

`$_sourceFile= ''`
Details

Type

`$_targetFile= ''`
Details

Type

`$_value= ''`
Details

Type

`$mapperElement= 'null'`
Default value `null` Details

Type

`$sourceFileSets= 'array'`
Default value `array` Details

Type

### Methods

`createFileset( ) :`
Nested element.
`createMapper( ) :`
Defines the FileNameMapper to use (nested mapper element).
`createSrcfiles( ) :`
Nested element.
Details

deprecated
  Deprecated since Phing 2.4.0

`evaluate( ) : boolean`
Evaluate (all) target and source file(s) to see if the target(s) is/are up-to-date.
Returns

Type | Description
--- | ---
boolean |

`getProperty( ) :`
Get property name
`getValue( ) :`
Returns the value, or "true" if a specific value wasn't provided.
`main( ) :`
Sets property to true if target file(s) have a more recent timestamp than (each of) the corresponding source file(s).
Details

throws

`scanDir( $srcDir, $files ) :`
Parameters

Name | Type | Description
--- | --- | ---
$srcDir |  |
$files |  |

`setProperty( \property $property ) :`
The property to set if the target file is more up-to-date than (each of) the source file(s).
Parameters

Name | Type | Description
--- | --- | ---
$property | \property | the name of the property to set if Target is up-to-date.

`setSrcfile( \file $file ) :`
The file that must be older than the target file if the property is to be set.
Parameters

Name | Type | Description
--- | --- | ---
$file | \file | the file we are checking against the target file.

`setTargetFile( \file $file ) :`
The file which must be more up-to-date than (each of) the source file(s) if the property is to be set.
Parameters

Name | Type | Description
--- | --- | ---
$file | \file | the file we are checking against.

`setValue( \value $value ) :`
The value to set the named property to if the target file is more up-to-date than (each of) the source file(s). Defaults to 'true'.
Parameters

Name | Type | Description
--- | --- | ---
$value | \value | the value to set the property to if Target is up-to-date

Documentation was generated by DocBlox 0.13.1.