FTPClient
This small FTP client was originally developed to support uploading files for some of my other projects. It includes support for passive mode transfers (a necessity with my firewall) and the following commands:
- openConnection (host, port)
- login (username, password)
- loginAnonymous
- setTransferType (ascii or binary)
- downloadDirectory (local path, transfer type, recursive?)
- downloadFile (server path, local path, transfer type)
- uploadDirectory (server path, local path, transfer type, recursive?, filename filter)
- uploadFile (server path, local, path, transfer type)
- getCurrentDirectory
- getFileSize (filename)
- getModificationTime (filename)
- getNameArray
- getNameList
- getSystemType
- changeDirectory (directory)
- parentDirectory
- renameFile (old filename, new filename)
- deleteFile (filename)
- removeDirectory (directory)
- setLineSeparator (separator)
- closeConnection
More information is available through the
JavaDoc API and
this usage example. If you're interested, feel free to
download the code and give it a try. You can
contact me if you run into any problems.