企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# C.13 FtpDeployTask Deploys a set of files to a remote FTP server. Table C.14:聽Attributes NameTypeDescriptionDefaultRequired`host``String`The hostname of the remote server.noneYes`port``Integer`The port of the remote server.21No`username``String`The username to use when logging in to the remote server.noneYes`password``String`The password to use when logging in to the remote server.noneYes`ssl``boolean`Whether to connect via SSL. This requires Net/FTP to be installed.`false`No`dir``String`Directory on the remote server.noneNo`mode``String`The transfer mode to use, either `ascii` or `binary`.binaryNo`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 C.13.1 Example ``` <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> ``` C.13.2 Supported Nested Tags - `fileset` The files to deploy