D. J. Bernstein
Internet publication


ftpparse is discussed on the ftpparse mailing list.

The ftpparse package consists of ftpparse.c and ftpparse.h. The latest version is 20001223.

What is it?

ftpparse is a library for parsing FTP LIST responses.

ftpparse currently understands the LIST output from any UNIX server, Microsoft FTP Service, Windows NT FTP Server, VMS, WFTPD, NetPresenz, NetWare, and MSDOS. It also supports EPLF, a solution to the LIST-parsing mess.

ftpparse parses file modification times into time_t, so you can easily compare them and display them in your favorite format. It lets you know how precise the time_t is: LOCAL meaning exact with known time zone (available from EPLF), REMOTEMINUTE meaning unknown time zone and seconds, or REMOTEDAY meaning unknown time zone and time of day.

To use ftpparse, simply feed each line of LIST output to the ftpparse() routine, along with a pointer to a struct ftpparse. If ftpparse() returns 1, you can find a filename and various other useful information inside the struct ftpparse.

Commercial use of ftpparse is fine, as long as you let me know what programs you're using it in.

ftpparse has been reported to work under UNIX, under Win32 with Visual C++ 5.0, and under Win16 with Borland C++ 4.52.