PDA

View Full Version : io directorylisting string problem


Che Mi K
08-10-2004, 05:24 AM
holla peeps

I´m just tryn to write my small ftp client
but theres a big problem for me with that directorylistingsstrings
of files and dirs. could anyone explain me how many bytes are
i.E. Attributes or File/Dirsize or File/Dirname ....

would be really great, did not found anything about that on RFC´s
perhaps me english just ² bad

thx a lot

ADDiCT
08-10-2004, 06:13 AM
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.

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)

Che Mi K
08-10-2004, 06:20 AM
thx fo fast answer
thought sumwhat ;)

that one or more spaces was me problem all the time
i think this will cost more time for my lill brain than the whole bunch of the other functions lol