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

## \ChmodTask
jump to top

Task that changes the permissions on a file/directory.

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

Extends from
  \Task
author
  Manuel Holtgrewe
author
  Hans Lellelid
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
version
  $Revision: 552 $

### Properties

`$failonerror= 'true'`
Default value `true` Details

Type

`$file= ''`
Details

Type

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

Type

`$filesystem= ''`
Details

Type

`$mode= ''`
Details

Type

`$quiet= 'false'`
Default value `false` Details

Type

`$verbose= 'true'`
Default value `true` Details

Type

### Methods

`checkParams( ) : void`
Ensure that correct parameters were passed in.
`chmod( ) : void`
Does the actual work.
`chmodFile( \PhingFile $file, int $mode ) :`
Actually change the mode for the file.
Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |
$mode | int |

`createFileSet( ) :`
Nested creator, adds a set of files (nested fileset attribute).
`main( ) : void`
Execute the touch operation.
`setFailonerror( $bool ) :`
This flag means 'note errors to the output, but keep going'
Parameters

Name | Type | Description
--- | --- | ---
$bool |  |

Details

see
  \setQuiet()

`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 |  |

`setMode( $str ) :`
Parameters

Name | Type | Description
--- | --- | ---
$str |  |

`setQuiet( $bool ) :`
Set quiet mode, which suppresses warnings if chmod() fails.
Parameters

Name | Type | Description
--- | --- | ---
$bool |  |

Details

see
  \setFailonerror()

`setVerbose( $bool ) :`
Set verbosity, which if set to false surpresses all but an overview of what happened.
Parameters

Name | Type | Description
--- | --- | ---
$bool |  |

Documentation was generated by DocBlox 0.13.1.