# tasks/ext/ScpTask.php

Copy files to and from a remote host using scp.

Author
  Michiel Rook
Author
  Johan Van den Brande
Package
  phing.tasks.ext
Version
  $Id: ScpTask.php 1388 2011-12-17 12:12:48Z mrook $

## \ScpTask
jump to top

Package: phing\tasks\ext

Copy files to and from a remote host using scp.

Parent(s)
  \Task < \ProjectComponent
Author
  Michiel Rook
Author
  Johan Van den Brande
Version
  $Id: ScpTask.php 1388 2011-12-17 12:12:48Z mrook $

### Properties

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

Type
  n/a

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

Type
  n/a

`$count= '0'`
Default value `0` Details

Type
  n/a

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

Type
  n/a

`$file= '""'`
Default value`""`Details

Type
  n/a

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

Type
  n/a

`$host= '""'`
Default value`""`Details

Type
  n/a

`$localEndpoint= '""'`
Default value`""`Details

Type
  n/a

`$logLevel= 'Project::MSG_VERBOSE'`
Default value `Project::MSG_VERBOSE` Details

Type
  n/a

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

Type
  n/a

`$password= '""'`
Default value`""`Details

Type
  n/a

`$port= '22'`
Default value `22` Details

Type
  n/a

`$privkeyfile= ''''`
Default value`''`Details

Type
  n/a

`$privkeyfilepassphrase= ''''`
Default value`''`Details

Type
  n/a

`$pubkeyfile= ''''`
Default value`''`Details

Type
  n/a

`$remoteEndpoint= '""'`
Default value`""`Details

Type
  n/a

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

Type
  n/a

`$todir= '""'`
Default value`""`Details

Type
  n/a

`$username= '""'`
Default value`""`Details

Type
  n/a

### Methods

`copyFile( $local, $remote ) : void`

Parameters

Name | Type | Description
--- | --- | ---
$local |  |
$remote |  |

`createFileSet( ) : \FileSet`

Nested creator, creates a FileSet for this task

Returns

Type | Description
--- | ---
\FileSet | The created fileset object

`getAutocreate( ) : void`

Returns whether to autocreate remote directories

`getDescription( ) : void`

`getFetch( ) : void`

Returns whether to send (default) or fetch files

`getFile( ) : void`

Returns local filename

`getHost( ) : void`

Returns the remote host

`getLocation( ) : void`

`getMode( ) : void`

Returns the mode value

`getOwningTarget( ) : void`

`getPassword( ) : void`

Returns the password

`getPort( ) : void`

Returns the remote host port

`getPrivkeyfile( ) : void`

Returns the private keyfile

`getPrivkeyfilepassphrase( $privkeyfilepassphrase ) : void`

Returns the private keyfile passphrase

Parameters

Name | Type | Description
--- | --- | ---
$privkeyfilepassphrase |  |

`getProject( ) : void`

`getPubkeyfile( ) : void`

Returns the pubkeyfile

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`getTodir( ) : void`

Returns the destination directory

`getUsername( ) : void`

Returns the username

`init( ) : void`

`log( ) : void`

`main( ) : void`

`maybeConfigure( ) : void`

`perform( ) : void`

`setAutocreate( $autocreate ) : void`

Sets whether to autocreate remote directories

Parameters

Name | Type | Description
--- | --- | ---
$autocreate |  |

`setDescription( ) : void`

`setFetch( $fetch ) : void`

Sets whether to send (default) or fetch files

Parameters

Name | Type | Description
--- | --- | ---
$fetch |  |

`setFile( $file ) : void`

Sets local filename

Parameters

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

`setHost( $h ) : void`

Sets the remote host

Parameters

Name | Type | Description
--- | --- | ---
$h |  |

`setLevel( string $level ) : void`

Set level of log messages generated (default = verbose)

Parameters

Name | Type | Description
--- | --- | ---
$level | string |

`setLocation( ) : void`

`setMode( $value ) : void`

Sets the mode value

Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setOwningTarget( ) : void`

`setPassword( $password ) : void`

Sets the password of the user to scp

Parameters

Name | Type | Description
--- | --- | ---
$password |  |

`setPort( $p ) : void`

Sets the remote host port

Parameters

Name | Type | Description
--- | --- | ---
$p |  |

`setPrivkeyfile( $privkeyfile ) : void`

Sets the private key file of the user to scp

Parameters

Name | Type | Description
--- | --- | ---
$privkeyfile |  |

`setPrivkeyfilepassphrase( $privkeyfilepassphrase ) : void`

Sets the private key file passphrase of the user to scp

Parameters

Name | Type | Description
--- | --- | ---
$privkeyfilepassphrase |  |

`setProject( ) : void`

`setPubkeyfile( $pubkeyfile ) : void`

Sets the public key file of the user to scp

Parameters

Name | Type | Description
--- | --- | ---
$pubkeyfile |  |

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

`setTodir( $todir ) : void`

Set destination directory

Parameters

Name | Type | Description
--- | --- | ---
$todir |  |

`setUsername( $username ) : void`

Sets the username of the user to scp

Parameters

Name | Type | Description
--- | --- | ---
$username |  |

Documentation was generated by DocBlox 0.17.1.