Deploys a set of files to a remote FTP server.
Table C.10: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
host | String | The hostname of the remote server. | none | Yes |
port | Integer | The port of the remote server. | 21 | No |
username | String | The username to use when logging in to the remote server. | none | Yes |
password | String | The password to use when logging in to the remote server. | none | Yes |
ssl | boolean | Whether to connect via SSL. This requires Net/FTP to be installed. | false | No |
dir | String | Directory on the remote server. | none | No |
mode | String | The transfer mode to use, either ascii or
binary . | binary | No |
clearfirst | Boolean | Delete all files in the remote directory before uploading. | false | No |
passive | Boolean | Open connection in passive mode | false | No |
dirmode | mixed | Permissions of the uploaded files, can either be 'inherit' or it can be a octal value without the leading zero. Settings the dirmode to 'inherit' will cause the uploaded files to have the same permissions as on the filesystem. | false | No |
filemode | mixed | This option does the same as dirmode, except it only affects regular files. | false | No |
depends | boolean | If depends is set to true, the task will only update files with a local modification timestamp that is newer than the corresponding timestamp on the server. | false | No |
level | String | Control the level at which the task reports status messages. One of
error , warning ,
info , verbose ,
debug . | verbose | No |
rawdatafallback | boolean | If Net_FTP is not able to parse the raw ftp data, the depends option does not work at all. Setting rawdatafallback will cause phing trying to parse the ftp data on its own, so the depends option might work again. If depends is set to false, rawdatafallback is ignored. | No | |
skiponsamesize | Boolean | Skip upload, if file of same size exists. | false | No |
<ftpdeploy host="${ftp.host}" port="${ftp.port}" username="${ftp.username}" password="${ftp.password}" dir="${ftp.dir}" ssl="true" passive="false" mode="${ftp.mode}"> <fileset dir="."> <include name="**"/> <exclude name="phing"/> <exclude name="build.xml"/> <exclude name="images/**.png"/> <exclude name="images/**.gif"/> <exclude name="images/**.jpg"/> </fileset> </ftpdeploy>
The files to deploy