Ftp API Reference

 Using ftp from the script by calling these functions.

connect($sessionString, $connectUrl, $port)

 Connect to the server. After connect, do login.

login($sessionString, $username, $password)

 Login into the Ftp server. Call this function after Ftp.Connect().

close($sessionString)

 Close ftp session.

pwd($sessionString)

 Returns the current directory of the remote host.

changeDir($sessionString, $remote)

 Change remote dir.

deleteFile($sessionString, $remote)

 Delet remote file $remote.

downloadFile($sessionString, $remote, $path)

 Download remote file $remote, and store it into $path.

listFiles($sessionString)

 List up files and directories in the current dir.

listDirectories($sessionString)

 Returns the array of child directories of current directory.

removeDirectories($sessionString, $pathname)

 Remove the remote directory.

rename($sessionString, $from, $to)

 Rename the remote file.

setFileType($sessionString, $typeName)

 Set the file type to transfer in. Available type is 'ascii' and 'binary'.

setListHiddenFiles($sessionString, $listHiddenFiles)

 Set the policy of listing file and directories. By setting $listHiddenFiles to true, hidden files are shown.

uploadFile($sessionString, $path, $remote)

 Upload a local file to the remote as $remote.


Go to Top