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

## \ChownTask
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
  Mehmet Emre Yilmaz
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
version
  $Revision: 765 $

### Properties

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

Type

`$file= ''`
Details

Type

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

Type

`$filesystem= ''`
Details

Type

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

Type

`$user= ''`
Details

Type

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

Type

### Methods

`checkParams( ) : void`
Ensure that correct parameters were passed in.
`chown( ) : void`
Does the actual work.
`chownFile( \PhingFile $file, string $user, string $group ) :`
Actually change the mode for the file.
Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |
$user | string |
$group | string |

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

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

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

Details

see
  \setFailonerror()

`setUser( $user ) :`
Sets the user
Parameters

Name | Type | Description
--- | --- | ---
$user |  |

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