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

## \TouchTask
jump to top

Touch a file and/or fileset(s); corresponds to the Unix touch command.

If the file to touch doesn't exist, an empty one is created.

Extends from
  \Task
author
  Andreas Aderhold
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
version
  $Revision: 526 $

### Properties

`$dateTime= ''`
Details

Type

`$file= ''`
Details

Type

`$fileUtils= ''`
Details

Type

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

Type

`$millis= ''`
Details

Type

### Methods

`__construct( ) :`
`_touch( ) :`
Does the actual work.
`createFileSet( ) : \FileSet`
Nested creator, adds a set of files (nested fileset attribute).
Returns

Type | Description
--- | ---
\FileSet |

`main( ) :`
Execute the touch operation.
`setDatetime( $dateTime ) :`
the new modification time of the file in the format MM/DD/YYYY HH:MM AM or PM; Optional, default=now
Parameters

Name | Type | Description
--- | --- | ---
$dateTime |  |

`setFile( $file ) :`
Sets a single source file to touch. If the file does not exist an empty file will be created.
Parameters

Name | Type | Description
--- | --- | ---
$file |  |

`setMillis( $millis ) :`
the new modification time of the file in milliseconds since midnight Jan 1 1970.

Optional, default=now

Parameters

Name | Type | Description
--- | --- | ---
$millis |  |

`touchFile( $file ) :`
Parameters

Name | Type | Description
--- | --- | ---
$file |  |

Documentation was generated by DocBlox 0.13.1.