View Single Post
Old 08-10-2004, 06:13 AM  
ADDiCT
Senior Member
 
Join Date: Aug 2003
Posts: 517
Default

There is indeed no RFC on ftp dirlisting, u'll have to invent your own way to parse the data. This is how each line looks like:
- access flags
- some number
- owner name
- group name
- filesize
- date
- filename or dirname
All fields are separated by one or more spaces.

Code:
drwxr-xr-x  18 ioFTPD       ADMiNS       276880417 Sep 23 19:58 GAMES
-rw-r--r--   0 ioFTPD       ADMiNS           17998 Apr 08 06:40 blabbla.nfo
access flags: drwxrwxrwx
d = directory, otherwise file
read/write/execute for owner, group and 'anyone'

date consists of 3 fields, mostly <month> <day> <hh:mm>
like Apr 08 16:45

(no idea what the number in the second field is for, i guess the number of subitems in a directory)
ADDiCT is offline