Cover photo for post The future of PEAR::Net_FTP(2)

The future of PEAR::Net_FTP(2)

PEAR::Net_FTP was initially planned as a simple object oriented wrapper to the native PHP FTP functions, with some additional features. This goal has been reached more or less since the first stable release on 2003-07-15. The upcoming version 1.3 (RC2 actual) implements the following features:

  • Wrapping all native FTP functions in an OO way.

  • Recursive up-/downloading, chmoding, creating and deleting of directory structures.

  • Automatic transfer mode determination from file extensions.

  • Directory listing by files/directories/both.

  • Automatic structuring and pre-parsing of directory listings.

  • Observable up- and download progress.

  • Full error code support.

Most of the code is quite stable and the biggest lot of bugs should have been fixed in the current RC phase. Since the requirenments for Net_FTP have changed in the past month, I decided to start designing and implementing Net_FTP2 in the next weeks. This will also give me the chance to refactor the whole class and to refine the (very outdated and in some parts uncomfortable) API. The major goals of Net_FTP2 are:

  • Driver based backend for different FTP implementations (native PHP, sockets, streams,...).

  • Refactored API (especially for use of recursive operations).

  • Observability of every recursive action.

Beside these major design goals and all features of Net_FTP, Net_FTP2 will implement some more advanced features like the following:

  • Support for FTPS.

  • Socket based backend for servers with disabled extFTP.

  • Pattern dependant actions (like listing, deleting,...).

  • Observability for all recursive actions.

  • ...

I think a first draft for Net_FTP2 will be available by the end of next week in the PEAR CVS. If you have any comments/ideas/suggestions/feature requests for Net_FTP2, please comment on this blog entry to let me know.

Comments

I really like the idea of recursive commands( Delete, chmod, upload, download ..etc ), thanks it would be really useful.

Please try to come out with a simple API, it makes the whole difference if developers are gonna use the package or not.

Also would it be possible to create a directory tree by providing a single string e.g.

$ftp->createDir( '2004/05/01/files/' );

createDir() would create all the directories in the string.

Good luck dude

Ammar Ibrahim at 2005-01-07